home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
dev
/
gcc
/
gcc270_readme.lha
/
gnu
/
gcc-2.7.0-amiga.diff
< prev
next >
Wrap
Text File
|
1995-08-24
|
141KB
|
4,068 lines
diff -2rcN /usr/goinfre/gcc-2.7.0/Makefile.in gcc-2.7.0-amiga/Makefile.in
*** /usr/goinfre/gcc-2.7.0/Makefile.in Thu Jun 15 12:01:43 1995
--- gcc-2.7.0-amiga/Makefile.in Fri Jun 23 11:52:13 1995
***************
*** 67,74 ****
SHELL = /bin/sh
# on sysV, define this as cp.
! INSTALL = install -c
# These permit overriding just for certain files.
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
--- 67,78 ----
SHELL = /bin/sh
# on sysV, define this as cp.
! INSTALL = cp
# These permit overriding just for certain files.
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
+ SYMLINK = cp
+ # Some systems don't support hardlinks. For this case, a simple copy
+ # will achieve the same results for our purposes.
+ HARDLINK = cp
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
***************
*** 100,104 ****
# Target to use when installing include directory. Either
! # install-headers-tar or install-headers-cpio.
INSTALL_HEADERS_DIR = install-headers-tar
--- 104,108 ----
# Target to use when installing include directory. Either
! # install-headers-tar or install-headers-cpio or install-headers-cp
INSTALL_HEADERS_DIR = install-headers-tar
***************
*** 106,110 ****
# Usually the one we just built.
# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
! GCC_FOR_TARGET = ./xgcc -B./
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
--- 110,115 ----
# Usually the one we just built.
# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
! XGCC = xgcc
! GCC_FOR_TARGET = ./$(XGCC) -B./
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
***************
*** 166,175 ****
# Common prefix for installation directories.
# NOTE: This directory must exist when you start installation.
! prefix = /usr/local
# Directory in which to put localized header files. On the systems with
# gcc as the native cc, `local_prefix' may not be `prefix' which is
# `/usr'.
# NOTE: local_prefix *should not* default from prefix.
! local_prefix = /usr/local
# Directory in which to put host dependent programs and libraries
exec_prefix = $(prefix)
--- 171,183 ----
# Common prefix for installation directories.
# NOTE: This directory must exist when you start installation.
! prefix = /gnu
# Directory in which to put localized header files. On the systems with
# gcc as the native cc, `local_prefix' may not be `prefix' which is
# `/usr'.
+ # Similar considerations apply for toolkits located on non-writable storage,
+ # such as CD-ROM, where we need a completely separate place to put local
+ # include files.
# NOTE: local_prefix *should not* default from prefix.
! local_prefix = /gnu
# Directory in which to put host dependent programs and libraries
exec_prefix = $(prefix)
***************
*** 672,676 ****
# Dump a specs file to make -B./ read these specs over installed ones.
! specs: xgcc$(exeext)
$(GCC_FOR_TARGET) -dumpspecs > tmp-specs
mv tmp-specs specs
--- 680,684 ----
# Dump a specs file to make -B./ read these specs over installed ones.
! specs: xgcc$(exeext) xgccv$(exeext)
$(GCC_FOR_TARGET) -dumpspecs > tmp-specs
mv tmp-specs specs
***************
*** 909,914 ****
# message from ar, we make sure all files are writable.
-(cd tmpcopy; chmod +w * > /dev/null 2>&1)
! (cd tmpcopy; $(AR) x ../$(LIBGCC2))
! (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
rm -rf tmpcopy
-if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
--- 917,923 ----
# message from ar, we make sure all files are writable.
-(cd tmpcopy; chmod +w * > /dev/null 2>&1)
! # The "cd..; wait" makes sure that the lock on tmpcopy has time to disappear.
! (cd tmpcopy; $(AR) x ../$(LIBGCC2); cd ..; /c/wait 2)
! (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext); cd ..; /c/wait 2)
rm -rf tmpcopy
-if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
***************
*** 983,990 ****
$(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
! GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
GCC_CFLAGS="$(GCC_CFLAGS)"
-rm -f libobjc.a
! ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
-if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
--- 992,999 ----
$(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
! GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
GCC_CFLAGS="$(GCC_CFLAGS)"
-rm -f libobjc.a
! $(HARDLINK) objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
-if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
***************
*** 996,1000 ****
$(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
! GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
GCC_CFLAGS="$(GCC_CFLAGS)"
--- 1005,1009 ----
$(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
! GCC_FOR_TARGET="$$thisdir1/$(XGCC) -B$$thisdir1/" \
GCC_CFLAGS="$(GCC_CFLAGS)"
***************
*** 1050,1054 ****
ld: collect2
rm -f ld$(exeext)
! ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
|| cp collect2$(exeext) ld$(exeext)
--- 1059,1063 ----
ld: collect2
rm -f ld$(exeext)
! $(HARDLINK) collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
|| cp collect2$(exeext) ld$(exeext)
***************
*** 1573,1577 ****
cpp: $(CCCP)
-rm -f cpp$(exeext)
! ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
|| cp $(CCCP)$(exeext) cpp$(exeext)
cccp: cccp.o cexp.o version.o $(LIBDEPS)
--- 1582,1586 ----
cpp: $(CCCP)
-rm -f cpp$(exeext)
! $(HARDLINK) $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
|| cp $(CCCP)$(exeext) cpp$(exeext)
cccp: cccp.o cexp.o version.o $(LIBDEPS)
***************
*** 1756,1760 ****
$(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
! GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
touch objc-headers
--- 1765,1769 ----
$(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
! GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
touch objc-headers
***************
*** 1942,1945 ****
--- 1951,1955 ----
-rm -fr stage1 stage2 stage3 stage4
-rm -f */stage1 */stage2 */stage3 */stage4 */include
+ -rm -f cp-parse.output
-rm -f objc-parse.output
-rm -f c-parse.output
***************
*** 2083,2087 ****
$(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(target)-gcc-1$(exeext); \
! ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
--- 2093,2097 ----
$(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(target)-gcc-1$(exeext); \
! $(HARDLINK) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
***************
*** 2154,2158 ****
if expr "$$dest" : "$$dir.*" > /dev/null; then \
rm -f $(libsubdir)/include/$$i; \
! ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
fi; \
done; \
--- 2164,2168 ----
if expr "$$dest" : "$$dir.*" > /dev/null; then \
rm -f $(libsubdir)/include/$$i; \
! $(SYMLINK) `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
fi; \
done; \
***************
*** 2177,2180 ****
--- 2187,2194 ----
(cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
+ # Install the include directory using simple recursive copy.
+ install-headers-cp: stmp-headers install-include-dir
+ cd include; cp -r . $(libsubdir)/include
+
# Put assert.h where it won't override GNU libc's assert.h.
# It goes in a dir that is searched after GNU libc's headers;
***************
*** 2269,2273 ****
mkdir tmp/objc
for file in *[0-9a-zA-Z+]; do \
! ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
done
cd config; \
--- 2283,2287 ----
mkdir tmp/objc
for file in *[0-9a-zA-Z+]; do \
! $(HARDLINK) $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
done
cd config; \
***************
*** 2277,2286 ****
cd $$file; \
for subfile in *[0-9a-zA-Z+]; do \
! ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
|| cp $$subfile ../../tmp/config/$$file; \
done; \
cd ..; \
else \
! ln $$file ../tmp/config >/dev/null 2>&1 \
|| cp $$file ../tmp/config; \
fi; \
--- 2291,2300 ----
cd $$file; \
for subfile in *[0-9a-zA-Z+]; do \
! $(HARDLINK) $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
|| cp $$subfile ../../tmp/config/$$file; \
done; \
cd ..; \
else \
! $(HARDLINK) $$file ../tmp/config >/dev/null 2>&1 \
|| cp $$file ../tmp/config; \
fi; \
***************
*** 2288,2299 ****
cd ginclude; \
for file in *[0-9a-zA-Z+]; do \
! ln $$file ../tmp/ginclude >/dev/null 2>&1 \
|| cp $$file ../tmp/ginclude; \
done
cd objc; \
for file in *[0-9a-zA-Z+]; do \
! ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
done
! ln .gdbinit tmp
# Finish making `distdir', after the languages have done their thing.
--- 2302,2313 ----
cd ginclude; \
for file in *[0-9a-zA-Z+]; do \
! $(HARDLINK) $$file ../tmp/ginclude >/dev/null 2>&1 \
|| cp $$file ../tmp/ginclude; \
done
cd objc; \
for file in *[0-9a-zA-Z+]; do \
! $(HARDLINK) $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
done
! $(HARDLINK) .gdbinit tmp
# Finish making `distdir', after the languages have done their thing.
***************
*** 2330,2344 ****
# because alloca.o is newer, we permit these recursive makes to compile
# alloca.o. Then cc1 is newer, so it won't have to be relinked.
! $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
$(MAKE) stage2
! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap2: force
! $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
$(MAKE) stage2
! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap3: force
! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
# Compare the object files in the current directory with those in the
--- 2344,2358 ----
# because alloca.o is newer, we permit these recursive makes to compile
# alloca.o. Then cc1 is newer, so it won't have to be relinked.
! $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
$(MAKE) stage2
! $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap2: force
! $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
$(MAKE) stage2
! $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap3: force
! $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
# Compare the object files in the current directory with those in the
***************
*** 2415,2426 ****
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
done
-mv $(STAGESTUFF) stage1
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
! -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
-rm -f stage1/libgcc.a
-cp libgcc.a stage1
--- 2429,2440 ----
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi; \
done
-mv $(STAGESTUFF) stage1
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
! -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
-rm -f stage1/libgcc.a
-cp libgcc.a stage1
***************
*** 2432,2443 ****
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
done
-mv $(STAGESTUFF) stage2
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
! -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
-rm -f stage2/libgcc.a
-cp libgcc.a stage2
--- 2446,2457 ----
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi; \
done
-mv $(STAGESTUFF) stage2
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
! -if [ -f collect-ld ] ; then $(SYMLINK) ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
-rm -f stage2/libgcc.a
-cp libgcc.a stage2
***************
*** 2449,2460 ****
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
done
-mv $(STAGESTUFF) stage3
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
! -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
-rm -f stage3/libgcc.a
-cp libgcc.a stage3
--- 2463,2474 ----
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi; \
done
-mv $(STAGESTUFF) stage3
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
! -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
-rm -f stage3/libgcc.a
-cp libgcc.a stage3
***************
*** 2466,2477 ****
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
done
-mv $(STAGESTUFF) stage4
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
! -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
-rm -f stage4/libgcc.a
-cp libgcc.a stage4
--- 2480,2491 ----
-for dir in . $(SUBDIRS) ; \
do \
! if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi; \
done
-mv $(STAGESTUFF) stage4
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
! -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
! -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
! -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
-rm -f stage4/libgcc.a
-cp libgcc.a stage4
diff -2rcN /usr/goinfre/gcc-2.7.0/Product-Info gcc-2.7.0-amiga/Product-Info
*** /usr/goinfre/gcc-2.7.0/Product-Info
--- gcc-2.7.0-amiga/Product-Info Fri Jun 23 11:52:13 1995
***************
*** 0 ****
--- 1,22 ----
+ .name
+ gcc
+ .fullname
+ GNU C/C++/Objective-C compiler
+ .type
+ Compiler
+ .short
+ GNU C/C++/Obj-C compilers.
+ .description
+ The GNU C, C++, and Objective C compilers. Includes all support for
+ compiling C, C++ and Objective C, including a run-time library for
+ Objective C.
+ .version
+ 2.6.4
+ .author
+ Free Software Foundation
+ .requirements
+ Amiga binaries require ixemul.library.
+ .distribution
+ GNU Public License
+ .described-by
+ Fred Fish (fnf@amigalib.com)
diff -2rcN /usr/goinfre/gcc-2.7.0/amigasup.c gcc-2.7.0-amiga/amigasup.c
*** /usr/goinfre/gcc-2.7.0/amigasup.c
--- gcc-2.7.0-amiga/amigasup.c Fri Jun 23 11:52:14 1995
***************
*** 0 ****
--- 1,171 ----
+ /* Supplementary host support for AmigaDOS. Used only when host is AmigaDOS.
+ Copyright (C) 1994 Free Software Foundation, Inc.
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ This code segment will interface between the startup code and the user's
+ main(), adjusting the stack if necessary. Two entry points are provided,
+ main(), and stkexit(). Programs should be compiled using
+ gcc -Dmain=stkmain -Dexit=stkexit
+ and linked with this module. Calling _exit is not provided for, but should
+ be trivial to implement.
+
+ The minimum acceptable stack size is obtained from the environment variable
+ GCC_STACK (change the #define ENVNAME to customize). If this variable is
+ not defined, the default is 50000 bytes (change the #define SIZE to
+ customize). If the current stack size is less than the minimum acceptable,
+ then a new stack is allocated, and appropriate actions are taken to ensure
+ that the original stack is restored before exit.
+
+ To link with my stderrfix hack, you will need to compile it using
+ gcc -Dmain=stkmain -c stderrfix.c
+ and compile everything else (apart from this file) using
+ gcc -Dmain=mymain -Dexit=stkexit
+ (I have not tested this, but there is no reason why it shouldn't work.)
+
+ AUTHOR: Kriton Kyrimis (kyrimis@theseas.ntua.gr)
+ KNOWN BUGS: Calling stkexit(0x8000000) will cause the program to exit
+ with the wrong exit code (0).
+ DISCLAIMER: Use this code at your own risk.
+ */
+
+ /* Putting this in version.c seems to screw up configure, which attempts to
+ extract the version number with a sed command that doesn't take this
+ string into account. Also, don't include the date of compilation
+ in this string because the annoyance of not being able to do multistage
+ build comparisons across days is more than the convenience gained
+ (if any) by having the build date incoporated in the executables. -fnf */
+ char VERSION[]="$VER:gcc 2.6.4";
+
+ #undef main
+ #undef exit
+
+ #include <stdlib.h>
+ #include <setjmp.h>
+ #include <dos/dosextens.h>
+ #include <proto/exec.h>
+ #include <proto/dos.h>
+
+ #define SIZE 50000
+ #define ENVNAME "GCCSTACK"
+
+ #define MAGIC 0x80000000
+
+ void stkexit(int);
+
+ static jmp_buf jmp;
+ static int swapped = 0;
+
+ main(int argc, char **argv)
+ {
+ /* Declare all variables as static, so that they are available no matter
+ which stack is active */
+ static struct Process *p;
+ static struct CommandLineInterface *c;
+ static int stacksize, prefsize, status;
+ static struct StackSwapStruct stack;
+ static char *envsize, *newstack;
+ /* The next two variables point to information in the old stack. Declare
+ them volatile, to avoid unexpected surprises introduced by the optimizer.
+ (This is apparently unnecessary under 2.6.1, but you never know.) */
+ static volatile int myargc;
+ static volatile char **myargv;
+
+ /* Determine original stack size */
+ p = (struct Process *)FindTask(NULL);
+ c = BADDR(p->pr_CLI);
+ if (c) {
+ stacksize = c->cli_DefaultStack * sizeof(LONG);
+ }else{
+ stacksize = p->pr_StackSize;
+ }
+
+ /* Determine preferred stack size */
+ envsize = getenv(ENVNAME);
+ if (envsize) {
+ prefsize = atoi(envsize);
+ }else{
+ prefsize = SIZE;
+ }
+
+ myargc = argc;
+ myargv = argv;
+
+ if (prefsize > stacksize) {
+ /* Round size to next long word */
+ prefsize = ((prefsize + (sizeof(LONG) - 1)) / sizeof(LONG)) * sizeof(LONG);
+
+ /* Allocate new stack */
+ newstack = malloc(prefsize);
+ if (!newstack) {
+ Printf("Can't allocate new stack!\n");
+ exit(RETURN_FAIL);
+ }
+
+ /* Build new stack structure */
+ stack.stk_Lower = newstack;
+ stack.stk_Upper = (ULONG)newstack + prefsize;
+ /* Determine the address the stackpointer has to go:
+ * Point to the last longword of the stackframe and subtract
+ * the arguments of StackSwap() since the compiler might
+ * try to adjust the stackpointer after calling it :-(.
+ */
+ stack.stk_Pointer = (APTR)(stack.stk_Upper-2*sizeof(long));
+
+ /* Switch to new stack */
+ StackSwap(&stack);
+ swapped = 1;
+ if (c) {
+ c->cli_DefaultStack = prefsize / sizeof(LONG);
+ }
+
+ /* Save the current position, so that on exit we may return to the exact
+ stack depth where we switched stacks, and switch them back again.
+ Programs should invoke stkexit() rather than exit(), or return from
+ stkmain(). Status contains the exit status given to stkexit().*/
+ if ((status = setjmp(jmp)) != 0) {
+ /* Switch back to old stack before exiting */
+ StackSwap(&stack);
+ if (c) {
+ c->cli_DefaultStack = stacksize / sizeof(LONG);
+ }
+ free(newstack);
+ if (status == MAGIC) { /* If real exit status is 0, stkexit converts */
+ status = 0; /* it to MAGIC, to avoid confusing setjmp */
+ }
+ exit(status);
+ }
+ status = stkmain(myargc, myargv);
+ stkexit(status);
+ } else {
+ return stkmain(myargc, myargv);
+ }
+ }
+
+ void
+ stkexit(int status)
+ {
+ if (!swapped) {
+ exit (status);
+ } else {
+ if (status == 0) { /* The world will end iff we pass 0 as the value */
+ status = MAGIC; /* for longjmp */
+ }
+ longjmp(jmp, status);
+ }
+ }
+
diff -2rcN /usr/goinfre/gcc-2.7.0/calls.c gcc-2.7.0-amiga/calls.c
*** /usr/goinfre/gcc-2.7.0/calls.c Thu Jun 15 12:15:32 1995
--- gcc-2.7.0-amiga/calls.c Fri Jun 23 11:52:15 1995
***************
*** 2264,2267 ****
--- 2264,2275 ----
argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
+ #if defined (__amigados__)
+ /* how would you do this RIGHT ?? fake a DECL node? dunno... */
+ #ifdef ENCODE_SECTION_INFO
+ /* mark it as a function (to be in the text section that is) */
+ SYMBOL_REF_FLAG (fun) = 1;
+ #endif
+ #endif
+
INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
***************
*** 2572,2575 ****
--- 2580,2591 ----
argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
+ #if defined (__amigados__)
+ /* how would you do this RIGHT ?? fake a DECL node? dunno... */
+ #ifdef ENCODE_SECTION_INFO
+ /* mark it as a function (to be in the text section that is) */
+ SYMBOL_REF_FLAG (fun) = 1;
+ #endif
+ #endif
+
INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
diff -2rcN /usr/goinfre/gcc-2.7.0/cccp.c gcc-2.7.0-amiga/cccp.c
*** /usr/goinfre/gcc-2.7.0/cccp.c Thu Jun 15 12:16:31 1995
--- gcc-2.7.0-amiga/cccp.c Sun Jun 25 15:41:07 1995
***************
*** 41,44 ****
--- 41,62 ----
#endif /* not EMACS */
+ #ifdef INHIBIT_ALLOCA_USE
+ /* Since cpp uses alloca to store all its read files, this is quite deadly
+ on a system with non-automatic stackgrowth like amigados, so we better
+ turn it off now. Normally alloca is #defined to __builtin_alloca, so
+ undefining it causes an external alloca to be used.
+
+ Note that it's not wise to generally inhibit __builtin_alloca, since
+ using the generic emulator results in a serious (!) speed penalty, and
+ it's bad enough that we have to live with it in cccp, don't make cc1
+ unbearably slow as well... */
+
+ #undef alloca
+ #endif
+
+ #ifdef __amigados__
+ static int amigados_abs_filename ();
+ #endif
+
#ifndef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "/usr/include"
***************
*** 361,364 ****
--- 379,390 ----
static int max_include_len;
+ #ifdef __amigados__
+ /* Phil.B: 03-Oct-94 Flag indicating process priority */
+ static int amiga_priority = -1;
+ static int amiga_old_priority;
+ #include <proto/exec.h>
+ struct Task *amiga_task;
+ #endif /* __amigados__ */
+
/* Nonzero means turn NOTREACHED into #pragma NOTREACHED etc */
***************
*** 1311,1314 ****
--- 1337,1349 ----
#endif /* RLIMIT_STACK defined */
+ #ifdef __amigados__
+ {
+ char *envstr;
+
+ if (envstr = getenv("GCCPRIORITY"))
+ if (((i = atoi(envstr)) > -20) && (i < 20)) amiga_priority = i;
+ }
+ #endif /* __amigados__ */
+
#ifdef SIGPIPE
signal (SIGPIPE, pipe_closed);
***************
*** 1320,1323 ****
--- 1355,1361 ----
&& cp[-1] != DIR_SEPARATOR
#endif
+ #ifdef VOL_SEPARATOR
+ && cp[-1] != VOL_SEPARATOR
+ #endif
)
--cp;
***************
*** 1519,1522 ****
--- 1557,1570 ----
case 'p':
+ #ifdef __amigados__
+ if (!strcmp (argv[i], "-priority")) {
+ if (i + 1 == argc)
+ fatal ("Priority missing after -P option");
+ if ((amiga_priority = atoi(argv[++i])) < -25)
+ amiga_priority = -25;
+ else if (amiga_priority > 25)
+ amiga_priority = 25;
+ } else
+ #endif /* __amigados__ */
if (!strcmp (argv[i], "-pedantic"))
pedantic = 1;
***************
*** 1808,1811 ****
--- 1856,1866 ----
}
+ #ifdef __amigados__
+ Forbid();
+ amiga_task = FindTask(NULL);
+ Permit();
+ amiga_old_priority = SetTaskPri(amiga_task, amiga_priority);
+ #endif /* __amigados__ */
+
/* Add dirs from CPATH after dirs from -I. */
/* There seems to be confusion about what CPATH should do,
***************
*** 2166,2169 ****
--- 2221,2227 ----
/* Discard all directory prefixes from filename. */
+ #ifdef FILE_NAME_NONDIRECTORY
+ q = FILE_NAME_NONDIRECTORY (in_fname);
+ #else
if ((q = rindex (in_fname, '/')) != NULL
#ifdef DIR_SEPARATOR
***************
*** 2174,2178 ****
else
q = in_fname;
!
/* Copy remainder to mungable area. */
p = (char *) alloca (strlen(q) + 8);
--- 2232,2236 ----
else
q = in_fname;
! #endif
/* Copy remainder to mungable area. */
p = (char *) alloca (strlen(q) + 8);
***************
*** 2329,2332 ****
--- 2387,2395 ----
fatal ("I/O error on output");
+ /* PhB 25-Jun-95: restore old process priority before exiting */
+ #ifdef __amigados__
+ SetTaskPri(amiga_task, amiga_old_priority);
+ #endif /* __amigados__ */
+
if (errors)
exit (FATAL_EXIT_CODE);
***************
*** 4007,4011 ****
--- 4070,4079 ----
if (!no_output && already_output == 0
&& (kt->pass_thru
+ /* Phil.B 27-Mar-93 not quite sure to keep this old fix */
+ #if defined (__amigados__) && 0
+ || ((kt->type == T_DEFINE || kt->type == T_UNDEF)
+ #else
|| (kt->type == T_DEFINE
+ #endif /* __amigados__ */
&& (dump_macros == dump_names
|| dump_macros == dump_definitions)))) {
***************
*** 4358,4361 ****
--- 4426,4437 ----
}
#endif
+ #ifdef VOL_SEPARATOR
+ if (ep == NULL) ep = rindex (nam, VOL_SEPARATOR);
+ else {
+ char *tmp = rindex (nam, VOL_SEPARATOR);
+ if (tmp != NULL && tmp > ep) ep = tmp;
+ }
+ if (ep != NULL && *ep == VOL_SEPARATOR) ep++;
+ #endif
#else /* VMS */
ep = rindex (nam, ']');
***************
*** 4484,4487 ****
--- 4560,4566 ----
/* If specified file name is absolute, just open it. */
+ #ifdef __amigados__
+ if (amigados_abs_filename (fbeg, flen)) {
+ #else
if (*fbeg == '/'
#ifdef DIR_SEPARATOR
***************
*** 4489,4492 ****
--- 4568,4572 ----
#endif
) {
+ #endif
strncpy (fname, (char *) fbeg, flen);
fname[flen] = 0;
***************
*** 4511,4514 ****
--- 4591,4597 ----
continue;
strcpy (fname, searchptr->fname);
+ #ifdef __amigados__
+ if (fname[strlen (fname) - 1] != ':')
+ #endif
strcat (fname, "/");
fname[strlen (fname) + flen] = 0;
***************
*** 9925,9928 ****
--- 10008,10016 ----
va_list args;
+ /* PhB 25-Jun-95: restore old process priority before exiting */
+ #ifdef __amigados__
+ SetTaskPri(amiga_task, amiga_old_priority);
+ #endif /* __amigados__ */
+
fprintf (stderr, "%s: ", progname);
VA_START (args, msg);
***************
*** 10421,10422 ****
--- 10509,10534 ----
}
#endif /* VMS */
+
+
+ #ifdef __amigados__
+
+ /* This function returns whether the LEN characters long filename FNAME
+ is an absolute path specification. */
+
+ static int
+ amigados_abs_filename (fname, len)
+ char *fname;
+ int len;
+ {
+ /* we're using ixemul.library, which treats `/foo' as `foo:', so
+ fname[0] is to be considered absolute as well */
+ if (fname[0] == '/')
+ return 1;
+
+ /* else do an index() on fname, but one which is limited to len characters */
+ while (*fname && *fname != ':' && len)
+ fname++, len--;
+
+ return *fname == ':';
+ }
+ #endif /* __amigados__ */
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/amigados.c gcc-2.7.0-amiga/config/m68k/amigados.c
*** /usr/goinfre/gcc-2.7.0/config/m68k/amigados.c
--- gcc-2.7.0-amiga/config/m68k/amigados.c Fri Jun 23 11:52:18 1995
***************
*** 0 ****
--- 1,205 ----
+ /* Definitions of target machine for GNU compiler. amiga 68000/68020 version.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ #include "m68k/m68k.c"
+
+ /* Does operand (which is a symbolic_operand) live in text space? If
+ so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
+
+ This function is used in base relative code generation. */
+
+ int
+ read_only_operand (operand)
+ rtx operand;
+ {
+ if (GET_CODE (operand) == CONST)
+ operand = XEXP (XEXP (operand, 0), 0);
+ if (GET_CODE (operand) == SYMBOL_REF)
+ return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
+ return 1;
+ }
+
+
+ /* the rest of the file is to implement AmigaDOS specific keywords some day.
+ The approach used so far used __attribute__ for this, but this required
+ changes to c-parse.y as well as if we'd use the common keywords used
+ on commercial AmigaDOS C-compilers as well. So in the future I'll probably
+ switch to __saveds and __interrupt keywords as well.
+
+ The rest of this file is currently ignored, because it's no longer
+ working with the current gcc version. */
+
+ #if not_yet_working
+
+ #include "tree.h"
+
+ struct attribute {
+ tree ident;
+ int saveds : 1,
+ interrupt : 1;
+ };
+
+
+ static struct attribute *a_tab = 0;
+ static int a_index, a_size;
+
+ void
+ add_attr_entry (attr)
+ struct attribute *attr;
+ {
+ if (! a_tab)
+ {
+ a_size = 10;
+ a_index = 0;
+ a_tab = (struct attribute *) xmalloc (a_size * sizeof (struct attribute));
+ }
+
+ if (a_index == a_size)
+ {
+ a_size <<= 1;
+ a_tab = (struct attribute *) xrealloc (a_tab, a_size * sizeof (struct attribute));
+ }
+
+ a_tab[a_index++] = *attr;
+ }
+
+
+ void
+ attr_do_saveds (function_ident)
+ tree function_ident;
+ {
+ struct attribute attr, *a;
+ int i;
+
+ for (i = 0, a = a_tab; i < a_index; i++, a++)
+ if (a->ident == function_ident)
+ {
+ a->saveds = 1;
+ return;
+ }
+
+ /* create a new entry for this function */
+ attr.ident = function_ident;
+ attr.saveds = 1;
+ attr.interrupt = 0;
+ add_attr_entry (&attr);
+ }
+
+ void
+ attr_do_interrupt (function_ident)
+ tree function_ident;
+ {
+ struct attribute attr, *a;
+ int i;
+
+ for (i = 0, a = a_tab; i < a_index; i++, a++)
+ if (a->ident == function_ident)
+ {
+ /* __interrupt implies __saveds */
+ a->saveds = 1;
+ a->interrupt = 1;
+ return;
+ }
+
+ /* create a new entry for this function */
+ attr.ident = function_ident;
+ attr.saveds = 1;
+ attr.interrupt = 1;
+ add_attr_entry (&attr);
+ }
+
+ int
+ attr_does_saveds (function_name)
+ char *function_name;
+ {
+ tree ident = get_identifier (function_name);
+ struct attribute *attr;
+ int i;
+
+ for (i = 0, attr = a_tab; i < a_index; i++, attr++)
+ if (attr->ident == ident)
+ return attr->saveds;
+
+ return 0;
+ }
+
+ int
+ attr_does_interrupt (function_name)
+ char *function_name;
+ {
+ tree ident = get_identifier (function_name);
+ struct attribute *attr;
+ int i;
+
+ for (i = 0, attr = a_tab; i < a_index; i++, attr++)
+ if (attr->ident == ident)
+ return attr->interrupt;
+
+ return 0;
+ }
+
+ #endif
+
+ /*
+ Stack checking and auto-extend
+
+ This is my first attempt to implement stack extension with gcc.
+ If you think some things should be changed please write
+ to me immediately (fleischr@izfm.uni-stuttgart.de, or even better
+ to amiga-gcc-port@lists.funet.fi for discussion).
+
+ If you don't want to recompile gcc (to check it out) you can still
+ test the example supported (bigtest.c) or read the documentation.
+ Simply do a 'make' to build it.
+
+ Matthias
+ */
+
+ rtx gen_stack_management_call (stack_pointer, arg, func)
+ rtx stack_pointer; /* rtx to put the result into */
+ rtx arg; /* The argument to put into d0 */
+ char *func; /* The name of the function to call */
+ {
+ rtx fcall, assem;
+ emit_move_insn (gen_rtx (REG, SImode, 0), arg); /* Move arg to d0 */
+ assem = gen_rtx (ASM_OPERANDS, VOIDmode, func, "=r", 0,
+ rtvec_alloc(1), rtvec_alloc(1), "internal", 0);
+ XVECEXP (assem, 3, 0) = gen_rtx (REG, SImode, 0);
+ XVECEXP (assem, 4, 0) = gen_rtx (ASM_INPUT, SImode, "r");
+ fcall = gen_rtx (PARALLEL, VOIDmode, rtvec_alloc(1+4));
+ XVECEXP (fcall, 0, 0)
+ = gen_rtx (SET, VOIDmode, stack_pointer, assem);
+ XVECEXP (fcall, 0, 1)
+ = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 9));
+ XVECEXP (fcall, 0, 2)
+ = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 8));
+ XVECEXP (fcall, 0, 3)
+ = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 1));
+ XVECEXP (fcall, 0, 4)
+ = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 0));
+ return fcall; /* call function sp=func(d0) */
+ }
+
+ rtx gen_stack_cleanup_call (stack_pointer,sa)
+ rtx stack_pointer;
+ rtx sa;
+ {
+ return gen_stack_management_call (stack_pointer, sa, "jbsr ___move_d0_sp");
+ }
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/amigados.h gcc-2.7.0-amiga/config/m68k/amigados.h
*** /usr/goinfre/gcc-2.7.0/config/m68k/amigados.h
--- gcc-2.7.0-amiga/config/m68k/amigados.h Sun Aug 6 21:30:47 1995
***************
*** 0 ****
--- 1,453 ----
+ /* Definitions of target machine for GNU compiler. amiga 68000/68020 version.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ /* Phil.B 12-Mar-95: Define USE_GAS if GCC is supposed to work with the GNU
+ assembler, GNU linker and GNU debugger using DBX debugging information. */
+
+ #define USE_GAS
+
+ /* Control assembler-syntax conditionals in m68k.md. */
+
+ #ifndef USE_GAS
+ #define MOTOROLA /* Use Motorola syntax rather than "MIT" */
+ #endif /* !USE_GAS */
+
+ #include "m68k/m68k.h"
+
+ /* See m68k.h for bits in TARGET_DEFAULT.
+ 0 means 68000, no hardware fpu (68881/68882/68040).
+ 7 means 68020 (or higher) with hardware fpu. */
+
+ #ifndef TARGET_DEFAULT
+ #define TARGET_DEFAULT 0
+ #endif
+
+ /* Define __HAVE_68881__ in preprocessor according to the -m flags.
+ This will control the use of inline 68881 insns in certain macros.
+ Also inform the program which CPU this is for. */
+
+ #if TARGET_DEFAULT & 02
+
+ /* -m68881 is the default */
+ #define CPP_SPEC \
+ "%{!msoft-float:-D__HAVE_68881__ }\
+ %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
+ %{mc68040:-Dmc68040}%{!mc68000:%{!m68000:-Dmc68020}}}"
+
+ #else
+
+ /* -msoft-float is the default, assume -mc68000 as well */
+ #define CPP_SPEC \
+ "%{m68881:-D__HAVE_68881__ }\
+ %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
+ %{mc68040:-Dmc68040}%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-Dmc68010}}}}}}}"
+
+ /* Don't try using XFmode since we don't have appropriate runtime software
+ support. */
+ #undef LONG_DOUBLE_TYPE_SIZE
+ #define LONG_DOUBLE_TYPE_SIZE 64
+
+ #endif
+
+ /* -m68000 requires special flags to the assembler. */
+
+ #define ASM_SPEC \
+ "%{m68000:-mc68010} %{mc68000:-mc68010} %{m68020:-mc68020} %{mc68020:-mc68020} %{m68030:-mc68030} %{mc68030:-mc68030} \
+ %{m68040:-mc68040} %{mc68040:-mc68040} %{m68020-40:-mc68020} %{mc68020-40:-mc68020} \
+ %{!mc68000:%{!m68000:%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:%{!m68020-40:%{!mc68020-40:-mc68010}}}}}}}}}} %{msmall-code:-l}"
+
+ /* amiga/amigados are the new "standard" defines for the Amiga, MCH_AMIGA
+ * was used before and is included for compatibility reasons */
+
+ #define CPP_PREDEFINES "-Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA -Asystem(amigados) -Acpu(m68k) -Amachine(m68k)"
+
+ /* Choose the right startup file, depending on whether we use base relative
+ code, base relative code with automatic relocation (-resident), or plain
+ crt0.o.
+
+ Profiling is currently only available for plain startup.
+ mcrt0.o does not (yet) exist. */
+
+ #define STARTFILE_SPEC \
+ "%{!noixemul:%{resident:rcrt0.o%s}%{!resident:%{!fbaserel:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\
+ %{fbaserel:%{pg:bgcrt0.o%s}%{!pg:%{p:bmcrt0.o%s}%{!p:bcrt0.o%s}}}}}\
+ %{noixemul:%{resident:libnix/nrcrt0.o%s}%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}}}"
+
+ #define ENDFILE_SPEC "%{noixemul:-lstubs}"
+
+ /* Automatically search libamiga.a for AmigaDOS specific functions. Note
+ that we first search the standard C library to resolve as much as
+ possible from there, since it has names that are duplicated in libamiga.a
+ which we *don't* want from there. Then search the standard C library
+ again to resolve any references that libamiga.a might have generated.
+ This may only be a temporary solution since it might be better to simply
+ remove the things from libamiga.a that should be pulled in from libc.a
+ instead, which would eliminate the first reference to libc.a. */
+
+ #define LIB_SPEC "%{!noixemul:%{!p:%{!pg:-lc -lamiga -lc}}%{p:-lc_p}%{pg:-lc_p}}%{noixemul:-lnixmain -lnix -lamiga}"
+
+ /* if debugging, tell the linker to output amiga-hunk symbols *and* a BSD
+ compatible debug hunk (which will probably change in the future, it's not
+ tremendously useful in its current state). */
+
+ #define LINK_SPEC "%{noixemul:-shortdata -fl libnix} %{fbaserel:%{!resident:-databss-together -fl libb}}\
+ %{resident:-databss-together -datadata-reloc -fl libb} %{g:-amiga-debug-hunk} \
+ %{m68020:-fl libm020} %{m68030:-fl libm020} %{m68040:-fl libm020} %{m68020-40:-fl libm020} %{m68881:-fl libm881}\
+ %{mc68020:-fl libm020} %{mc68030:-fl libm020} %{mc68040:-fl libm020} %{mc68020-40:-fl libm020} %{mc68881:-fl libm881}"
+
+ #define CC1_SPEC "%{m68040:-mbitfield }%{mc68040:-mbitfield }%{resident:-fbaserel }%{msmall-code:-fno-function-cse }%{!noixemul:-mfixedstack} "
+
+ #define CC1PLUS_SPEC "%{m68040:-mbitfield }%{mc68040:-mbitfield }%{resident:-fbaserel }%{msmall-code:-fno-function-cse }%{!noixemul:-mfixedstack} "
+
+ /* Omit frame pointer at high optimization levels. (This doesn't hurt, since
+ GDB doesn't work under AmigaDOS at the moment anyway..) */
+
+ #define OPTIMIZATION_OPTIONS(OPTIMIZE) \
+ { \
+ if (OPTIMIZE >= 2) \
+ flag_omit_frame_pointer = 1; \
+ }
+
+ /* provide a dummy entry for the small-code switch. This is currently only
+ needed by the assembler (explanations: m68k.h), but will be used by cc1
+ to output 16bit pc-relative code later.
+ PhB 21-Jun-95: use now SUBTARGET_SWITCHES instead of redefining
+ whole TARGET_SWITCHES, means that all additions made to m68k.* are
+ now taken into account */
+
+ #undef SUBTARGET_SWITCHES
+ #define SUBTARGET_SWITCHES \
+ { "small-code", 0 },/* Affects *_SPEC and/or GAS. */ \
+ { "stackcheck", 02000}, \
+ { "nostackcheck", -02000}, \
+ { "stackextend", 04000}, \
+ { "nostackextend", -04000}, \
+ { "fixedstack", -04200},
+
+ #define TARGET_STACKCHECK (target_flags&02000)
+ #define TARGET_STACKEXTEND (!TARGET_STACKCHECK&&(target_flags&04000))
+
+ /* Every structure or union's size must be a multiple of 2 bytes. */
+
+ #define STRUCTURE_SIZE_BOUNDARY 16
+
+ /* This is (almost;-)) BSD, so it wants DBX format. */
+
+ #define DBX_DEBUGGING_INFO
+
+ /* Allow folding division by zero. */
+ #define REAL_INFINITY
+
+ /* The following was hacked into final.c, to allow some notice of
+ * source line and filename to be injected into the assembly code,
+ * even if not using one of the "approved" debuggers (albaugh@agames.com).
+ */
+ #if 0
+ #define ASM_NOTE_SOURCE_LINE(FILE, LINE, FILENAME)\
+ fprintf(file,"*#line %d \"%s\"\n",(LINE),(FILENAME))
+ #endif
+
+ #if 0 /* This apparently is no longer necessary? */
+
+ /* This is how to output an assembler line defining a `double' constant. */
+
+ #undef ASM_OUTPUT_DOUBLE
+ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
+ { \
+ if (REAL_VALUE_ISINF (VALUE)) \
+ fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \
+ else if (isnan (VALUE)) \
+ { \
+ union { double d; long l[2];} t; \
+ t.d = (VALUE); \
+ fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t.l[0], t.l[1]); \
+ } \
+ else \
+ fprintf (FILE, "\t.double 0r%.17g\n", VALUE); \
+ }
+
+ /* This is how to output an assembler line defining a `float' constant. */
+
+ #undef ASM_OUTPUT_FLOAT
+ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
+ { \
+ if (REAL_VALUE_ISINF (VALUE)) \
+ fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \
+ else if (isnan (VALUE)) \
+ { \
+ union { float f; long l;} t; \
+ t.f = (VALUE); \
+ fprintf (FILE, "\t.long 0x%lx\n", t.l); \
+ } \
+ else \
+ fprintf (FILE, "\t.single 0r%.9g\n", VALUE); \
+ }
+
+ /* This is how to output an assembler lines defining floating operands.
+ There's no way to output a NaN's fraction, so we lose it. */
+
+ #undef ASM_OUTPUT_FLOAT_OPERAND
+ #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
+ do { \
+ if (CODE == 'f') \
+ { \
+ (REAL_VALUE_ISINF ((VALUE)) \
+ ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
+ : (VALUE) == -0.0 \
+ ? asm_fprintf (FILE, "%I0r-0.0") \
+ : asm_fprintf (FILE, "%I0r%.9g", (VALUE))) \
+ } else { \
+ long l; \
+ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
+ if (sizeof (int) == sizeof (long)) \
+ asm_fprintf ((FILE), "%I0x%x", l); \
+ else \
+ asm_fprintf ((FILE), "%I0x%lx", l); \
+ } \
+ } while (0)
+
+ #undef ASM_OUTPUT_DOUBLE_OPERAND
+ #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
+ (REAL_VALUE_ISINF ((VALUE)) \
+ ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
+ : (VALUE) == -0.0 \
+ ? asm_fprintf (FILE, "%I0r-0.0") \
+ : asm_fprintf (FILE, "%I0r%.17g", (VALUE)))
+
+ #endif /* 0 */
+
+ /* use A5 as framepointer instead of A6, this makes A6 available as a
+ general purpose register, and can thus be used without problems in
+ direct library calls. */
+
+ #undef FRAME_POINTER_REGNUM
+ #define FRAME_POINTER_REGNUM 13
+ #undef ARG_POINTER_REGNUM
+ #define ARG_POINTER_REGNUM 13
+
+ /* we use A4 for this, not A5, which is the framepointer */
+ #undef PIC_OFFSET_TABLE_REGNUM
+ #define PIC_OFFSET_TABLE_REGNUM 12
+
+ /* setup a default shell return value for those (gazillion..) programs that
+ (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
+ cause the shell to randomly caugh upon executing such programs (contrary
+ to Unix, AmigaDOS scripts are terminated with an error if a program returns
+ with an error code above the `error' or even `failure' level
+ (which is configurable with the FAILAT command) */
+
+ #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
+
+ /* we do have an ansi-compliant c-library ;-) */
+ #define HAVE_VPRINTF
+ #define HAVE_VFPRINTF
+ #define HAVE_PUTENV
+ #define HAVE_STRERROR
+ #define HAVE_ATEXIT
+
+ /* given that symbolic_operand(X), return TRUE if no special
+ base relative relocation is necessary */
+
+ #define LEGITIMATE_BASEREL_OPERAND_P(X) \
+ (flag_pic >= 3 && read_only_operand (X))
+
+ #undef LEGITIMATE_PIC_OPERAND_P
+ #define LEGITIMATE_PIC_OPERAND_P(X) \
+ (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
+
+ /* Phil.B 12-Mar-95: check if this would fix some PIC problems */
+ /* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an
+ operand of a function call. */
+ /* #undef LEGITIMATE_PIC_OPERAND_P
+ #define LEGITIMATE_PIC_OPERAND_P(X) \
+ (! symbolic_operand (X, VOIDmode) \
+ || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X)))
+ */
+
+ /* Define this macro if references to a symbol must be treated
+ differently depending on something about the variable or
+ function named by the symbol (such as what section it is in).
+
+ The macro definition, if any, is executed immediately after the
+ rtl for DECL or other node is created.
+ The value of the rtl will be a `mem' whose address is a
+ `symbol_ref'.
+
+ The usual thing for this macro to do is to a flag in the
+ `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
+ name string in the `symbol_ref' (if one bit is not enough
+ information).
+
+ On the Amiga we use this to indicate if a symbol is in text or
+ data space. */
+
+ #define ENCODE_SECTION_INFO(DECL) \
+ do \
+ { \
+ if (TREE_CODE (DECL) == FUNCTION_DECL) \
+ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \
+ else \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
+ if (flag_pic >= 3 && \
+ (TREE_CODE (DECL) == STRING_CST && !flag_writable_strings)) \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; \
+ else if (flag_pic < 3 && \
+ RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl)) \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; \
+ } \
+ } \
+ while (0)
+
+ #undef SELECT_RTX_SECTION
+ #define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
+
+ /* according to varasm.c, RELOC referrs *only* to whether constants (!)
+ are addressed by address. This doesn't matter in baserelative code,
+ so we allow (inspite of flag_pic) readonly_data_section() in that
+ case */
+
+ #undef SELECT_SECTION
+ #define SELECT_SECTION(DECL, RELOC) \
+ { \
+ if ((TREE_CODE (DECL) == STRING_CST) && !flag_writable_strings) \
+ readonly_data_section (); \
+ else if (flag_pic < 3 \
+ && TREE_READONLY (DECL) \
+ && ! TREE_THIS_VOLATILE (DECL) \
+ && DECL_INITIAL (DECL) \
+ && (DECL_INITIAL (DECL) == error_mark_node \
+ || TREE_CONSTANT (DECL_INITIAL (DECL))) \
+ && ! (flag_pic && RELOC)) \
+ readonly_data_section (); \
+ else \
+ data_section (); \
+ }
+
+
+
+ #if not_yet_working
+
+ /* starting support for amiga specific keywords
+ * --------------------------------------------
+ */
+
+ /* validate attributes that don't take a parameter. Currently we support
+ * __attribute__ (saveds) and __attribute__ (interrupt)
+ */
+ #define HANDLE_ATTRIBUTE0(attr) \
+ (strcmp(attr, "saveds") != 0 && strcmp(attr, "interrupt") != 0)
+
+ /* (c-common.c)
+ * install additional attributes
+ */
+ #define HANDLE_EXTRA_ATTRIBUTES(a) \
+ if (TREE_VALUE (a) != 0 \
+ && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE \
+ && TREE_VALUE (a) == get_identifier ("saveds")) \
+ { \
+ if (TREE_CODE (decl) != FUNCTION_DECL) \
+ { \
+ warning_with_decl (decl, \
+ "saveds attribute specified for non-function `%s'"); \
+ return; \
+ } \
+ \
+ attr_do_saveds (DECL_NAME (decl)); \
+ } \
+ else if (TREE_VALUE (a) != 0 \
+ && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE \
+ && TREE_VALUE (a) == get_identifier ("interrupt")) \
+ { \
+ if (TREE_CODE (decl) != FUNCTION_DECL) \
+ { \
+ warning_with_decl (decl, \
+ "saveds attribute specified for non-function `%s'"); \
+ return; \
+ } \
+ \
+ attr_do_interrupt (DECL_NAME (decl)); \
+ } \
+
+
+ #define PROLOGUE_EXTRA_SAVE(mask) \
+ { extern char *current_function_name; \
+ /* saveds makes the function preserve d1/a0/a1 as well */ \
+ if (attr_does_saveds (current_function_name)) \
+ mask |= 0x40c0; } \
+
+
+ #define EPILOGUE_EXTRA_RESTORE(mask, nregs) \
+ { extern char *current_function_name; \
+ /* restore those extra registers */ \
+ if (attr_does_saveds (current_function_name)) \
+ { \
+ mask |= 0x0302; \
+ nregs += 3; \
+ } } \
+
+
+ #define EPILOGUE_EXTRA_BARRIER_KLUDGE(stream) \
+ { extern char *current_function_name; \
+ /* PLEASE Help! how is this done cleaner?? */ \
+ if (attr_does_saveds (current_function_name)) \
+ { \
+ fprintf (stderr, \
+ "warning: couldn't cleanup `saveds'-stack in `%s'.\n"); \
+ fprintf (stderr, \
+ " this is only ok, if the function never returns!\n"); \
+ } } \
+
+
+ #define EPILOGUE_EXTRA_TEST(stream) \
+ { extern char *current_function_name; \
+ /* with the interrupt-attribute, we have to set the cc before rts */ \
+ if (attr_does_interrupt (current_function_name)) \
+ asm_fprintf (stream, "\ttstl %s\n", reg_names[0]); } \
+
+ #endif
+
+
+ /*
+ * Support for automatic stack extension.
+ */
+
+ #define HAVE_restore_stack_nonlocal 1
+ #define gen_restore_stack_nonlocal \
+ (TARGET_STACKEXTEND?gen_stack_cleanup_call:gen_move_insn)
+
+ #define HAVE_restore_stack_function 1
+ #define gen_restore_stack_function gen_restore_stack_nonlocal
+
+ #define HAVE_restore_stack_block 1
+ #define gen_restore_stack_block gen_restore_stack_nonlocal
+
+ /* Reserve PIC_OFFSET_TABLE_REGNUM (a5) for doing PIC relocation if position
+ independent code is being generated, by making it a fixed register. */
+
+ #define CONDITIONAL_REGISTER_USAGE \
+ { \
+ if (flag_pic) \
+ fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
+ /* prevent saving/restoring of the base reg */ \
+ if (flag_pic == 3) \
+ call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
+ }
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/m68k.c gcc-2.7.0-amiga/config/m68k/m68k.c
*** /usr/goinfre/gcc-2.7.0/config/m68k/m68k.c Thu Jun 15 20:12:45 1995
--- gcc-2.7.0-amiga/config/m68k/m68k.c Fri Jun 23 11:52:19 1995
***************
*** 63,70 ****
finalize_pic ()
{
! if (flag_pic && current_function_uses_pic_offset_table)
{
rtx insn = gen_rtx (USE, VOIDmode, pic_offset_table_rtx);
emit_insn_after (insn, get_insns ());
emit_insn (insn);
}
--- 63,72 ----
finalize_pic ()
{
! if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
{
rtx insn = gen_rtx (USE, VOIDmode, pic_offset_table_rtx);
+ #ifndef __amigados__
emit_insn_after (insn, get_insns ());
+ #endif
emit_insn (insn);
}
***************
*** 95,102 ****
extern char call_used_regs[];
int fsize = (size + 3) & -4;
!
if (frame_pointer_needed)
{
if (fsize == 0 && TARGET_68040)
{
--- 97,134 ----
extern char call_used_regs[];
int fsize = (size + 3) & -4;
!
+ /* Matthias Fleischer stack-checking and auto-extend for the Amiga */
+ #ifndef MOTOROLA
+ if (TARGET_STACKCHECK)
+ {
+ if (fsize<256)
+ asm_fprintf (stream, "\tjbsr ___stkchk_0\n");
+ else if(fsize<0x8000)
+ asm_fprintf (stream, "\tmovel #%d:W,d0\n\tjbsr ___stkchk_d0\n",
+ fsize, reg_names[FRAME_POINTER_REGNUM]);
+ else
+ asm_fprintf (stream, "\tmovel #%d,d0\n\tjbsr ___stkchk_d0\n",
+ fsize, reg_names[FRAME_POINTER_REGNUM]);
+ }
+ #endif
if (frame_pointer_needed)
{
+ /* Matthias Fleischer stack-checking and auto-extend for the Amiga */
+ #ifndef MOTOROLA
+ if (TARGET_STACKEXTEND)
+ {
+ if (!fsize)
+ asm_fprintf (stream, "\tjbsr ___link_%s_0_f\n",
+ reg_names[FRAME_POINTER_REGNUM]);
+ else if(fsize<0x8000)
+ asm_fprintf (stream, "\tmovel #%d:W,d0\n\tjbsr ___link_%s_d0_f\n",
+ fsize, reg_names[FRAME_POINTER_REGNUM]);
+ else
+ asm_fprintf (stream, "\tmovel #%d,d0\n\tjbsr ___link_%s_d0_f\n",
+ fsize, reg_names[FRAME_POINTER_REGNUM]);
+ }
+ else
+ #endif
if (fsize == 0 && TARGET_68040)
{
***************
*** 144,147 ****
--- 176,193 ----
}
}
+ /* Matthias Fleischer stack-checking and auto-extend for the Amiga */
+ #ifndef MOTOROLA
+ else if (TARGET_STACKEXTEND)
+ {
+ if (!fsize)
+ asm_fprintf (stream, "\tjbsr ___sub_0_sp_f\n");
+ else if (fsize+4<0x8000)
+ asm_fprintf (stream, "\tmovel #%d:W,d0\n\tjbsr ___sub_d0_sp_f\n",
+ fsize + 4, reg_names[FRAME_POINTER_REGNUM]);
+ else
+ asm_fprintf (stream, "\tmovel %0I%d,d0\n\tjbsr ___sub_d0_sp_f\n",
+ fsize + 4, reg_names[FRAME_POINTER_REGNUM]);
+ }
+ #endif
else if (fsize)
{
***************
*** 202,205 ****
--- 248,254 ----
num_saved_regs--;
}
+ #ifdef PROLOGUE_EXTRA_SAVE
+ PROLOGUE_EXTRA_SAVE (mask);
+ #endif
#if NEED_PROBE
***************
*** 235,239 ****
#endif
}
! if (flag_pic && current_function_uses_pic_offset_table)
{
#ifdef MOTOROLA
--- 284,288 ----
#endif
}
! if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
{
#ifdef MOTOROLA
***************
*** 300,303 ****
--- 349,355 ----
about which function the pc is in at this address. */
asm_fprintf (stream, "\tnop\n");
+ #ifdef EPILOGUE_EXTRA_BARRIER_KLUDGE
+ EPILOGUE_EXTRA_BARRIER_KLUDGE(stream);
+ #endif
return;
}
***************
*** 330,333 ****
--- 382,388 ----
mask |= 1 << regno;
}
+ #ifdef EPILOGUE_EXTRA_RESTORE
+ EPILOGUE_EXTRA_RESTORE(mask, nregs);
+ #endif
offset = foffset + nregs * 4;
if (offset + fsize >= 0x8000
***************
*** 511,514 ****
--- 566,575 ----
}
if (frame_pointer_needed)
+ #ifndef MOTOROLA
+ if (TARGET_STACKEXTEND && current_function_calls_alloca)
+ asm_fprintf (stream, "\tjra ___unlk_%s_rts\n",
+ reg_names[FRAME_POINTER_REGNUM]);
+ else
+ #endif
fprintf (stream, "\tunlk %s\n",
reg_names[FRAME_POINTER_REGNUM]);
***************
*** 534,541 ****
}
}
if (current_function_pops_args)
asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
else
! fprintf (stream, "\trts\n");
}
--- 595,607 ----
}
}
+ #ifdef EPILOGUE_EXTRA_TEST
+ EPILOGUE_EXTRA_TEST(stream);
+ #endif
if (current_function_pops_args)
asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
else
! if (!TARGET_STACKEXTEND ||
! !frame_pointer_needed || !current_function_calls_alloca)
! fprintf (stream, "\trts\n");
}
***************
*** 980,989 ****
if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
{
if (reg == 0)
abort ();
! pic_ref = gen_rtx (MEM, Pmode,
! gen_rtx (PLUS, Pmode,
! pic_offset_table_rtx, orig));
current_function_uses_pic_offset_table = 1;
RTX_UNCHANGING_P (pic_ref) = 1;
--- 1046,1063 ----
if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
{
+ #ifdef LEGITIMATE_BASEREL_OPERAND_P
+ if (LEGITIMATE_BASEREL_OPERAND_P (orig))
+ return orig;
+ #endif
+
if (reg == 0)
abort ();
! if (flag_pic >= 3)
! pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
! else
! pic_ref = gen_rtx (MEM, Pmode,
! gen_rtx (PLUS, Pmode,
! pic_offset_table_rtx, orig));
current_function_uses_pic_offset_table = 1;
RTX_UNCHANGING_P (pic_ref) = 1;
***************
*** 2436,2439 ****
--- 2510,2517 ----
if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
fprintf (file, ":l");
+ if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
+ fprintf (file, ":W");
+ if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
+ fprintf (file, ":L");
}
if (addr != 0 && ireg != 0)
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/m68k.md gcc-2.7.0-amiga/config/m68k/m68k.md
*** /usr/goinfre/gcc-2.7.0/config/m68k/m68k.md Thu Jun 15 21:52:50 1995
--- gcc-2.7.0-amiga/config/m68k/m68k.md Fri Jun 23 11:52:20 1995
***************
*** 446,450 ****
"
{
! if (flag_pic && symbolic_operand (operands[1], SImode))
{
/* The source is an address which requires PIC relocation.
--- 446,454 ----
"
{
! if (flag_pic && symbolic_operand (operands[1], SImode)
! #ifdef LEGITIMATE_BASEREL_OPERAND_P
! && (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
! #endif
! )
{
/* The source is an address which requires PIC relocation.
***************
*** 793,803 ****
if (flag_pic && symbolic_operand (operands[1], SImode))
{
! /* The source is an address which requires PIC relocation.
! Call legitimize_pic_address with the source, mode, and a relocation
! register (a new pseudo, or the final destination if reload_in_progress
! is set). Then fall through normally */
! extern rtx legitimize_pic_address();
! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
}
}")
--- 797,812 ----
if (flag_pic && symbolic_operand (operands[1], SImode))
{
! #ifdef LEGITIMATE_BASEREL_OPERAND_P
! if (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
! #endif
! {
! /* The source is an address which requires PIC relocation.
! Call legitimize_pic_address with the source, mode, and a relocation
! register (a new pseudo, or the final destination if reload_in_progress
! is set). Then fall through normally */
! extern rtx legitimize_pic_address();
! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
! }
}
}")
***************
*** 2161,2166 ****
/* These insns can result from reloads to access
stack slots over 64k from the frame pointer. */
! if (GET_CODE (operands[2]) == CONST_INT
! && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000)
return \"move%.l %2,%0\;add%.l %1,%0\";
#ifdef SGS
--- 2170,2176 ----
/* These insns can result from reloads to access
stack slots over 64k from the frame pointer. */
! if (((GET_CODE (operands[2]) == CONST_INT
! && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000))
! || (flag_pic == 4 && operands[1] == pic_offset_table_rtx))
return \"move%.l %2,%0\;add%.l %1,%0\";
#ifdef SGS
***************
*** 5881,5885 ****
"
{
! if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
#ifdef MOTOROLA
SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
--- 5891,5895 ----
"
{
! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
#ifdef MOTOROLA
SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
***************
*** 5896,5900 ****
;; Operand 1 not really used on the m68000.
! "! flag_pic"
"*
#ifdef MOTOROLA
--- 5906,5910 ----
;; Operand 1 not really used on the m68000.
! "(! flag_pic || flag_pic >= 3)"
"*
#ifdef MOTOROLA
***************
*** 5916,5920 ****
;; Operand 1 not really used on the m68000.
! "flag_pic"
"*
#ifdef MOTOROLA
--- 5926,5930 ----
;; Operand 1 not really used on the m68000.
! "(flag_pic && flag_pic < 3)"
"*
#ifdef MOTOROLA
***************
*** 5941,5945 ****
"
{
! if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
#ifdef MOTOROLA
SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
--- 5951,5955 ----
"
{
! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
#ifdef MOTOROLA
SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
***************
*** 5956,5960 ****
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "! flag_pic"
"*
#ifdef MOTOROLA
--- 5966,5970 ----
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "(! flag_pic || flag_pic >= 3)"
"*
#ifdef MOTOROLA
***************
*** 5976,5980 ****
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "flag_pic"
"*
#ifdef MOTOROLA
--- 5986,5990 ----
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "(flag_pic && flag_pic < 3)"
"*
#ifdef MOTOROLA
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/t-amigados gcc-2.7.0-amiga/config/m68k/t-amigados
*** /usr/goinfre/gcc-2.7.0/config/m68k/t-amigados
--- gcc-2.7.0-amiga/config/m68k/t-amigados Fri Jun 23 11:52:21 1995
***************
*** 0 ****
--- 1,352 ----
+ # Makefile fragment for amigados target.
+
+ # We generate two additional things:
+ #
+ # libb/libgcc.a
+ # A base relative version of libgcc.a which is used when compiling and
+ # linking with the '-resident' option.
+ #
+ # libb/libm020/libgcc.a
+ # An accelerated base relative version of libgcc.a which is used when
+ # compiling and linking with the '-mc68020' & '-resident' options.
+ #
+ # libm020/libgcc.a
+ # An accelerated version of libgcc.a which is used when compiling and
+ # linking with the '-mc68020' option.
+ #
+ # xgccv
+ # A forking gcc instead of one calling ssytem(). This makes it less
+ # system conformant (can't ^C it when started from make), while providing
+ # increased functionality (-pipe option).
+
+ # Use the vfork'ing version of gcc by default, so that the -pipe option can
+ # get tested. To use the regular version just do "make XGCC=gcc". Note that
+ # PIPE is defined in x-amigados, so if we are doing a native build, it will
+ # be defined. It can be overridden with "make PIPE=".
+
+ XGCC = xgccv $(PIPE)
+ GCC_FOR_TARGET = ./$(XGCC) -B./
+
+ # Build residentable versions of the gcc executables by default. Use
+ # "make RESIDENT=" to build non-residentable versions.
+ # Note: This failed during bootstrapping of 2.5.5.
+
+ #RESIDENT = -resident
+
+ # The standard additional target flags for the compiler.
+
+ T_CFLAGS = $(RESIDENT)
+
+ # Allow the user to override the default target optimizations with gcc, or if
+ # the target compiler is not gcc and doesn't understand -O<N>.
+
+ T_OPTIMISE = -O2
+
+ # Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
+ # own equivalent of the UNIX /usr/include tree. For gcc, the standard headers
+ # are in /gnu/include and system specific headers are in /gnu/os-include.
+ # Use these paths for fixincludes.
+
+ SYSTEM_HEADER_DIR = /gnu/include
+ OTHER_FIXINCLUDES_DIRS = /gnu/os-include
+
+ # We don't need a libgcc1, it's all in ixemul.library
+
+ LIBGCC1 = libgcc1.null
+
+ # Flags to use when compiling the normal version of libgcc.a.
+ # Don't compile with debugging, as long as there is no debugger.
+ # Explicitly leave out the -resident compilation flag and don't use T_CFLAGS.
+
+ LIBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
+ $(CROSS_GCC_CFLAGS)
+
+ # Flags to use when compiling the base relative version of libgcc.a.
+ # Don't compile with debugging, as long as there is no debugger.
+ # Explicitly force -resident in the compilation flags and don't use T_CFLAGS.
+
+ LIBBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
+ $(CROSS_GCC_CFLAGS) -resident
+
+ # Flags to use when compiling the 68020 versions of libgcc.a.
+ # Don't compile with debugging, as long as there is no debugger.
+ # Explicitly force -mc68020 in the compilation flags and don't use T_CFLAGS.
+
+ LIBM020GCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
+ $(CROSS_GCC_CFLAGS) -mc68020
+
+ # Flags to use when compiling the base relative 68020 versions of libgcc.a.
+ # Don't compile with debugging, as long as there is no debugger.
+ # Explicitly force -mc68020 & -resident in the compilation flags and don't use
+ # T_CFLAGS.
+
+ LIBBM020GCC2_CFLAGS = $(LIBBGCC2_CFLAGS) -mc68020
+
+ # Build the base relative library and accelerated libraries.
+ # It is later copied into /gnu/lib/gcc-lib/amigados/<version>/libb/libgcc.a, whereas
+ # libgcc.a is copied into /gnu/lib/gcc-lib/amigados/<version>/libgcc.a.
+ # Accelerated libraries are copied into same directories, with an extra dir level
+ # libm020, thus libb/libm020. It doesn't work very well to define one of the
+ # EXTRA_* macros to contain libb/libgcc.a, particularly for doing "make stageN"
+ # or "make install".
+
+ GCC_PARTS=$(GCC_PASSES) libgcc.a libb/libgcc.a libm020/libgcc.a \
+ libb/libm020/libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
+
+ # Add install_libbgcc to normal define of INSTALL_LIBGCC. Let install-gccv
+ # hitch a ride on here as well.
+
+ INSTALL_LIBGCC = install-libgcc install-libbgcc install-libm020gcc install-libbm020gcc install-gccv
+
+ # This includes the knowledge that target amigados doesn't need libgcc1.a
+
+ libb/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
+ $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
+ # Actually build it in tmplibbgcc.a, then rename at end,
+ # so that libb/libgcc.a itself remains nonexistent if compilation is aborted.
+ -rm -f tmplibbgcc.a
+ # -e causes any failing command to make this rule fail.
+ # -e doesn't work in certain shells, so we test $$? as well.
+ set -e; \
+ for name in $(LIB2FUNCS); \
+ do \
+ echo $${name}; \
+ $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
+ $(srcdir)/libgcc2.c -o $${name}.o; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
+ rm -f $${name}.o; \
+ done
+ # Some shells crash when a loop has no items.
+ # So make sure there is always at least one--`..'.
+ # Then ignore it.
+ # We don't use -e here because there are if statements
+ # that should not make the command give up when the if condition is false.
+ # Instead, we test for failure after each command where it matters.
+ -for file in .. $(LIB2FUNCS_EXTRA); \
+ do \
+ if [ x$${file} != x.. ]; then \
+ name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
+ echo $${name}; \
+ if [ $${name}.asm = $${file} ]; then \
+ cp $${file} $${name}.s || exit 1; file=$${name}.s; \
+ else true; fi; \
+ $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
+ rm -f $${name}.[so]; \
+ else true; \
+ fi; \
+ done
+ -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbgcc.a; else true; fi
+ -if [ -d libb ] ; then true ; else mkdir libb ; fi
+ mv tmplibbgcc.a libb/libgcc.a
+
+
+ install-libbgcc: libb/libgcc.a install-dir
+ -if [ -d $(libsubdir)/libb ] ; then true ; else mkdir $(libsubdir)/libb ; fi
+ -if [ -f libb/libgcc.a ] ; then \
+ rm -f $(libsubdir)/libb/libgcc.a; \
+ $(INSTALL_DATA) libb/libgcc.a $(libsubdir)/libb/libgcc.a; \
+ if $(RANLIB_TEST) ; then \
+ (cd $(libsubdir)/libb; $(RANLIB) libgcc.a); else true; fi; \
+ chmod a-x $(libsubdir)/libb/libgcc.a; \
+ else true; fi
+
+ libm020/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
+ $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
+ # Actually build it in tmplibm020gcc.a, then rename at end,
+ # so that libm020/libgcc.a itself remains nonexistent if compilation is aborted.
+ -rm -f tmplibm020gcc.a
+ # -e causes any failing command to make this rule fail.
+ # -e doesn't work in certain shells, so we test $$? as well.
+ set -e; \
+ for name in $(LIB2FUNCS); \
+ do \
+ echo $${name}; \
+ $(GCC_FOR_TARGET) $(LIBM020GCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
+ $(srcdir)/libgcc2.c -o $${name}.o; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibm020gcc.a $${name}.o; \
+ rm -f $${name}.o; \
+ done
+ # Some shells crash when a loop has no items.
+ # So make sure there is always at least one--`..'.
+ # Then ignore it.
+ # We don't use -e here because there are if statements
+ # that should not make the command give up when the if condition is false.
+ # Instead, we test for failure after each command where it matters.
+ -for file in .. $(LIB2FUNCS_EXTRA); \
+ do \
+ if [ x$${file} != x.. ]; then \
+ name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
+ echo $${name}; \
+ if [ $${name}.asm = $${file} ]; then \
+ cp $${file} $${name}.s || exit 1; file=$${name}.s; \
+ else true; fi; \
+ $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibm020gcc.a $${name}.o; \
+ rm -f $${name}.[so]; \
+ else true; \
+ fi; \
+ done
+ -if $(RANLIB_TEST) ; then $(RANLIB) tmplibm020gcc.a; else true; fi
+ -if [ -d libm020 ] ; then true ; else mkdir libm020 ; fi
+ mv tmplibm020gcc.a libm020/libgcc.a
+
+
+ install-libm020gcc: libm020/libgcc.a install-dir
+ -if [ -d $(libsubdir)/libm020 ] ; then true ; else mkdir $(libsubdir)/libm020 ; fi
+ -if [ -f libm020/libgcc.a ] ; then \
+ rm -f $(libsubdir)/libm020/libgcc.a; \
+ $(INSTALL_DATA) libm020/libgcc.a $(libsubdir)/libm020/libgcc.a; \
+ if $(RANLIB_TEST) ; then \
+ (cd $(libsubdir)/libm020; $(RANLIB) libgcc.a); else true; fi; \
+ chmod a-x $(libsubdir)/libm020/libgcc.a; \
+ else true; fi
+
+ libb/libm020/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
+ $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
+ # Actually build it in tmplibbm020gcc.a, then rename at end,
+ # so that libb/libm020/libgcc.a itself remains nonexistent if compilation is aborted.
+ -rm -f tmplibbm020gcc.a
+ # -e causes any failing command to make this rule fail.
+ # -e doesn't work in certain shells, so we test $$? as well.
+ set -e; \
+ for name in $(LIB2FUNCS); \
+ do \
+ echo $${name}; \
+ $(GCC_FOR_TARGET) $(LIBBM020GCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
+ $(srcdir)/libgcc2.c -o $${name}.o; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibbm020gcc.a $${name}.o; \
+ rm -f $${name}.o; \
+ done
+ # Some shells crash when a loop has no items.
+ # So make sure there is always at least one--`..'.
+ # Then ignore it.
+ # We don't use -e here because there are if statements
+ # that should not make the command give up when the if condition is false.
+ # Instead, we test for failure after each command where it matters.
+ -for file in .. $(LIB2FUNCS_EXTRA); \
+ do \
+ if [ x$${file} != x.. ]; then \
+ name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
+ echo $${name}; \
+ if [ $${name}.asm = $${file} ]; then \
+ cp $${file} $${name}.s || exit 1; file=$${name}.s; \
+ else true; fi; \
+ $(GCC_FOR_TARGET) $(LIBBGCC2CFLAGS) $(INCLUDES) -c $${file}; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibbm020gcc.a $${name}.o; \
+ rm -f $${name}.[so]; \
+ else true; \
+ fi; \
+ done
+ -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbm020gcc.a; else true; fi
+ -if [ -d libb ] ; then true ; else mkdir libb ; fi
+ -if [ -d libb/libm020 ] ; then true ; else mkdir libb/libm020 ; fi
+ mv tmplibbm020gcc.a libb/libm020/libgcc.a
+
+
+ install-libbm020gcc: libb/libm020/libgcc.a install-dir
+ -if [ -d $(libsubdir)/libb/libm020 ] ; then true ; else mkdir $(libsubdir)/libb/libm020 ; fi
+ -if [ -f libb/libm020/libgcc.a ] ; then \
+ rm -f $(libsubdir)/libb/libm020/libgcc.a; \
+ $(INSTALL_DATA) libb/libm020/libgcc.a $(libsubdir)/libb/libm020/libgcc.a; \
+ if $(RANLIB_TEST) ; then \
+ (cd $(libsubdir)/libb/libm020; $(RANLIB) libgcc.a); else true; fi; \
+ chmod a-x $(libsubdir)/libb/libm020/libgcc.a; \
+ else true; fi
+
+ # PhB:
+ # toplev.o target need to define additional flags to handle stack
+ # allocation in real main. As for now we hack building of toplev.o
+ # defining MAYBE_USE_COLLECT2 flag, which is only used for toplev.o.
+ # Then we define EXTRA_OBJS to amigasup.o.
+
+ MAYBE_USE_COLLECT2= -Dmain=stkmain -Dexit=stkexit
+ EXTRA_OBJS = amigasup.o
+
+ # The default gcc (xgcc) is built without -DAMIGADOS_FORK_GCC. This gcc (xgccv)
+ # is built with AMIGADOS_FORK_GCC defined, so that it can use '-pipe'. We
+ # don't want to define EXTRA_PASSES to xgccv because that will cause xgccv
+ # to be installed in $(libsubdir), so instead we use the default GCC_PASSES
+ # and add xgccv to it.
+
+ GCC_PASSES = xgcc xgccv cc1 cpp $(EXTRA_PASSES)
+
+ xgccv: xgccv.o version.o $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgccv xgccv.o version.o $(LIBS)
+
+ xgccv.o: gcc.c $(CONFIG_H) config.status
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
+ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
+ -DDEFAULT_TARGET_VERSION=\"$(version)\" \
+ -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
+ -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
+ -DAMIGADOS_FORK_GCC \
+ -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -o xgccv.o
+
+ install-gccv: xgccv
+ rm -f $(bindir)/gccv
+ $(INSTALL_PROGRAM) xgccv $(bindir)/gccv
+
+ # When making one of the stage<N> dirs, we need to make subdirs for
+ # additional libraries, and copy them there. base-relative libraries
+ # and accelerated libraries are preserved through stages.
+
+ EXTRA_STAGE1_TARGETS = stage1-libamiga
+ EXTRA_STAGE2_TARGETS = stage2-libamiga
+ EXTRA_STAGE3_TARGETS = stage3-libamiga
+ EXTRA_STAGE4_TARGETW = stage4-libamiga
+
+ stage1-libamiga:
+ -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
+ -if [ -d stage1/libb ] ; then true ; else mkdir stage1/libb ; fi
+ -if [ -d stage1/libb/libm020 ] ; then true ; else mkdir stage1/libb/libm020 ; fi
+ -if [ -d stage1/libm020 ] ; then true ; else mkdir stage1/libm020 ; fi
+ -cp libb/libgcc.a stage1/libb/libgcc.a
+ -cp libb/libm020/libgcc.a stage1/libb/libm020/libgcc.a
+ -cp libm020/libgcc.a stage1/libm020/libgcc.a
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libgcc.i; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libm020/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libm020/libgcc.a; else true; fi
+
+ stage2-libamiga:
+ -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
+ -if [ -d stage2/libb ] ; then true ; else mkdir stage2/libb ; fi
+ -if [ -d stage2/libb/libm020 ] ; then true ; else mkdir stage2/libb/libm020 ; fi
+ -if [ -d stage2/libm020 ] ; then true ; else mkdir stage2/libm020 ; fi
+ -cp libb/libgcc.a stage2/libb/libgcc.a
+ -cp libb/libm020/libgcc.a stage2/libb/libm020/libgcc.a
+ -cp libm020/libgcc.a stage2/libm020/libgcc.a
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libm020/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libm020/libgcc.a; else true; fi
+
+ stage3-libamiga:
+ -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
+ -if [ -d stage3/libb ] ; then true ; else mkdir stage3/libb ; fi
+ -if [ -d stage3/libb/libm020 ] ; then true ; else mkdir stage3/libb/libm020 ; fi
+ -if [ -d stage3/libm020 ] ; then true ; else mkdir stage3/libm020 ; fi
+ -cp libb/libgcc.a stage3/libb/libgcc.a
+ -cp libb/libm020/libgcc.a stage3/libb/libm020/libgcc.a
+ -cp libm020/libgcc.a stage3/libm020/libgcc.a
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libm020/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libm020/libgcc.a; else true; fi
+
+ stage4-libamiga:
+ -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
+ -if [ -d stage4/libb ] ; then true ; else mkdir stage4/libb ; fi
+ -if [ -d stage4/libb/libm020 ] ; then true ; else mkdir stage4/libb/libm020 ; fi
+ -if [ -d stage4/libm020 ] ; then true ; else mkdir stage4/libm020 ; fi
+ -cp libb/libgcc.a stage4/libb/libgcc.a
+ -cp libb/libm020/libgcc.a stage4/libb/libm020/libgcc.a
+ -cp libm020/libgcc.a stage4/libm020/libgcc.a
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libm020/libgcc.a; else true; fi
+ -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libm020/libgcc.a; else true; fi
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/x-amigados gcc-2.7.0-amiga/config/m68k/x-amigados
*** /usr/goinfre/gcc-2.7.0/config/m68k/x-amigados
--- gcc-2.7.0-amiga/config/m68k/x-amigados Fri Jun 23 11:52:21 1995
***************
*** 0 ****
--- 1,52 ----
+ # Note: It doesn't do any good to try to define prefix or local_prefix
+ # in the host overrides because configure will just change them back.
+ # You either have to give an appropriate option to configure or live with
+ # an Amiga specific patch to configure. See the note in configure. -fnf
+
+ # Building under amigados almost certainly requires an already working gcc.
+ # Use gccv, which is a gcc compiled with AMIGADOS_FORK_GCC so "-pipe" will
+ # work and get exercised. To bootstrap with the regular gcc just do
+ # "make CC=gcc". To bootstrap without "-pipe" do "make PIPE=".
+
+ CC = gccv $(PIPE)
+
+ # Disable -pipe for now since I had problems bootstrapping gcc 2.5.5 with
+ # it. (fnf)
+ #PIPE = -pipe
+
+ # Allow the user to override the default host optimization with gcc, or if the
+ # host compiler is not gcc and doesn't understand -O<N>.
+
+ X_OPTIMIZE = -O2
+
+ # The standard additional host flags for the compiler.
+
+ X_CFLAGS = $(X_OPTIMIZE)
+
+ # Man pages get a wierd suffix...
+
+ manext = .0
+
+ # We really shouldn't specify CFLAGS from here, but there's no other way
+ # to get rid of the `-g' indoctrinated by Makefile.in. Note this becomes
+ # part of both the host compilation CFLAGS and the target compilation
+ # CFLAGS.
+
+ CFLAGS =
+
+ # Ranlib does exist, but may not be in a path where the default RANLIB_TEST
+ # expects it, so just force it to true.
+
+ RANLIB_TEST = true
+
+ # Until we can make sure no cross-device hardlinks are tried, and until
+ # symlinks can be made in canonical amigados format (dev:path/file), just
+ # use copy with timestamp preservation. This only wastes some disk space
+ # and means you have to reconfigure if you change any of the files that
+ # would normally be linked to. -fnf
+
+ HARDLINK = cp -p
+ SYMLINK = cp -p
+
+ # Build supplimentary Amiga host support file.
+ amigasup.o: amigasup.c
diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/xm-amigados.h gcc-2.7.0-amiga/config/m68k/xm-amigados.h
*** /usr/goinfre/gcc-2.7.0/config/m68k/xm-amigados.h
--- gcc-2.7.0-amiga/config/m68k/xm-amigados.h Fri Jun 23 11:52:21 1995
***************
*** 0 ****
--- 1,255 ----
+ /* Configuration for GNU C-compiler for Commodore Amiga, running AmigaDOS.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ /* first include the generic header, then modify some parts.. */
+
+ #include "m68k/xm-m68k.h"
+
+ /* On the Amiga, there are two pathname separators, '/' (DIR_SEPARATOR)
+ and ':' (VOL_SEPARATOR). DIR_SEPARATOR defaults to the correct
+ character, so we don't have to explicitly set it. */
+
+ #define VOL_SEPARATOR ':'
+
+ /* Amiga specific headers, such as from the Native Developer Update kits,
+ go in SYSTEM_INCLUDE_DIR. STANDARD_INCLUDE_DIR is the equivalent of
+ Unix "/usr/include". All other include paths are set in Makefile. */
+
+ #define SYSTEM_INCLUDE_DIR "/gnu/os-include"
+ #define STANDARD_INCLUDE_DIR "/gnu/include"
+
+ /* Fork one piped subcommand. SEARCH_FLAG is the system call to use
+ (either execv or execvp). ARGV is the arg vector to use.
+ NOT_LAST is nonzero if this is not the last subcommand
+ (i.e. its output should be piped to the next one.) */
+
+ #ifndef AMIGADOS_FORK_GCC
+
+ /* This version uses a more or less amigados-conformant way of running a
+ program (in the context of the parent). If you want to use -pipe however,
+ you'll have to use the vfork() version afterwards.
+ Phil.B: 29-May-94 quick hack (number 20 added to length) because xgcc
+ doesn't work.
+ */
+
+ #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
+ ({char *_argline; \
+ int _arglinelength, _i; \
+ \
+ for (_i = 1, _arglinelength=0; ARGV[_i]; ++_i) \
+ _arglinelength += strlen(ARGV[_i]) + 1; \
+ \
+ _arglinelength += strlen(PROGRAM) + 20 + 1; \
+ \
+ if (!(_argline = (char *)alloca(_arglinelength))) \
+ pfatal_with_name ("alloca"); \
+ \
+ strcpy(_argline, PROGRAM); \
+ for (_i = 1; ARGV[_i]; ++_i) \
+ { \
+ strcat(_argline, " "); \
+ strcat(_argline, ARGV[_i]); \
+ } \
+ \
+ ssystem(_argline); }) \
+
+ #define PEXECUTE_RESULT(STATUS, COMMAND) \
+ ({ STATUS = COMMAND.pid; })
+
+ #else
+
+ /* the vfork() version. This one has the drawback, that gcc is not
+ interruptible when started from make, since ixemul.library doesn't yet
+ propagate ^C to subprocesses. */
+
+ #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
+ ({int (*_func)() = (SEARCH_FLAG ? execv : execvp); \
+ int _pid; \
+ int _pdes[2]; \
+ int _input_desc = last_pipe_input; \
+ int _output_desc = STDOUT_FILE_NO; \
+ int _retries, _sleep_interval, _result; \
+ \
+ /* If this isn't the last process, make a pipe for its output, \
+ and record it as waiting to be the input to the next process. */ \
+ \
+ if (NOT_LAST) \
+ { \
+ if (pipe (_pdes) < 0) \
+ pfatal_with_name ("pipe"); \
+ _output_desc = _pdes[WRITE_PORT]; \
+ last_pipe_input = _pdes[READ_PORT]; \
+ } \
+ else \
+ last_pipe_input = STDIN_FILE_NO; \
+ \
+ /* Fork a subprocess; wait and retry if it fails. */ \
+ _sleep_interval = 1; \
+ for (_retries = 0; _retries < 4; _retries++) \
+ { \
+ _pid = vfork (); \
+ if (_pid >= 0) \
+ break; \
+ sleep (_sleep_interval); \
+ _sleep_interval *= 2; \
+ } \
+ \
+ switch (_pid) \
+ { \
+ case -1: \
+ pfatal_with_name ("vfork"); \
+ /* NOTREACHED */ \
+ _result = 0; \
+ break; \
+ \
+ case 0: /* child */ \
+ /* Move the input and output pipes into place, if nec. */ \
+ if (_input_desc != STDIN_FILE_NO) \
+ { \
+ close (STDIN_FILE_NO); \
+ dup (_input_desc); \
+ close (_input_desc); \
+ } \
+ if (_output_desc != STDOUT_FILE_NO) \
+ { \
+ close (STDOUT_FILE_NO); \
+ dup (_output_desc); \
+ close (_output_desc); \
+ } \
+ \
+ /* Close the parent's descs that aren't wanted here. */ \
+ if (last_pipe_input != STDIN_FILE_NO) \
+ close (last_pipe_input); \
+ \
+ /* Exec the program. */ \
+ (*_func) (PROGRAM, ARGV); \
+ perror_exec (PROGRAM); \
+ exit (-1); \
+ /* NOTREACHED */ \
+ _result = 0; \
+ break; \
+ \
+ default: \
+ /* In the parent, after forking. \
+ Close the descriptors that we made for this child. */ \
+ if (_input_desc != STDIN_FILE_NO) \
+ close (_input_desc); \
+ if (_output_desc != STDOUT_FILE_NO) \
+ close (_output_desc); \
+ \
+ /* Return child's process number. */ \
+ _result = _pid; \
+ break; \
+ } \
+ _result; }) \
+
+ #define PEXECUTE_RESULT(STATUS, COMMAND) \
+ ({ wait (& STATUS); })
+
+ #endif /* AMIGADOS_FORK_GCC */
+
+ /* the following macros are stolen more or less from xm-vms.h ... */
+
+ /* This macro is used to help compare filenames in cp-lex.c.
+
+ We also need to make sure that the names are all lower case, because
+ we must be able to compare filenames to determine if a file implements
+ a class. */
+
+ #define FILE_NAME_NONDIRECTORY(C) \
+ ({ \
+ extern char *rindex(); \
+ char * pnt_ = (C), * pnt1_; \
+ pnt1_ = pnt_ - 1; \
+ while (*++pnt1_) \
+ if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20; \
+ pnt1_ = rindex (pnt_, '/'); \
+ pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_); \
+ (pnt1_ == 0 ? pnt_ : pnt1_ + 1); \
+ })
+
+ /* Macro to generate the name of the cross reference file. The standard
+ one does not work, since it was written assuming that the conventions
+ of a unix style filesystem will work on the host system.
+
+ Contrary to VMS, I'm using the original unix filename, there's no reason
+ not to use this under AmigaDOS. */
+
+ #define XREF_FILE_NAME(BUFF, NAME) \
+ s = FILE_NAME_NONDIRECTORY (NAME); \
+ if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME); \
+ else { \
+ unsigned char ch = *s; /* could be Latin1 char.. */ \
+ /* temporary: cut the filename from the directory */\
+ *s = 0; \
+ sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1); \
+ /* and restore the filename */ \
+ *s = ch; \
+ } \
+
+ /* Macro that is used in cp-xref.c to determine whether a file name is
+ absolute or not.
+
+ This checks for both, '/' as first character, since we're running under
+ ixemul.library which provides for this unix'ism, and for the usual
+ logical-terminator, ':', somewhere in the filename. */
+
+ #define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
+
+ /* the colon conflicts with the name space of logicals */
+
+ #define PATH_SEPARATOR ','
+
+ /* AmigaDOS handles rename(2) *much* better than any link(2)/unlink(2)
+ hacks. It's actually the inverse case as on Unix. rename(2) was always
+ there, link(2) is new with OS 2.0 */
+
+ #define HAVE_rename 1
+
+ /* Phil.B 17-Apr-95 Added stack checking code submitted by Kriton Kyrimis
+ (kyrimis@theseas.ntua.gr) on 10-Feb-95, modified for inclusion into gcc
+
+ What stackcheck does is to add the following code at the beginning of
+ each function:
+ cmpl __StackBottom,sp
+ bccs .+8
+ jmp __StackOverflow
+
+ _StackBottom and _StackOverflow() are defined in stackchecksetup.c.
+ _StackBottom is set to the bottom of the stack plus some leeway for
+ subroutine arguments (128 bytes). _StackOverflow() sets the stack
+ pointer to a sane value, prints an error message and exits.
+
+ Even with stack checking, you cannot be completely safe, as overflows
+ are detected on function entry, rather than during function execution.
+ E.g.,
+ crash(){
+ char scribble[100000];
+ int i;
+ for (i=0; i<100000; i++) scribble[i]=0;
+ check(scribble);
+ }
+ check(char *x){}
+ In the above example, stack overflow and its side-effects will occur in
+ crash(), but it will be detected in check(), when it is too late. (The
+ same thing happens with SAS/C's stack checking, BTW.)
+ */
+
+ /* #defined AMIGA_STACK_CHECKING */
diff -2rcN /usr/goinfre/gcc-2.7.0/configure gcc-2.7.0-amiga/configure
*** /usr/goinfre/gcc-2.7.0/configure Thu Jun 15 22:54:14 1995
--- gcc-2.7.0-amiga/configure Fri Jun 23 11:52:22 1995
***************
*** 5,8 ****
--- 5,12 ----
#This file is part of GNU CC.
+ # AmigaDOS Notes: Where "echo" can be invoked with a first arg that
+ # starts with '-', run the external echo instead, since the pdksh builtin
+ # version botches this case.
+
#GNU CC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
***************
*** 54,80 ****
# Default --srcdir to the directory where the script is found,
# if a directory was specified.
! # The second sed call is to convert `.//configure' to `./configure'.
! srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
if [ x$srcdir = x$0 ]
then
srcdir=
fi
host=
! # Default prefix to /usr/local.
! prefix=/usr/local
!
# On systems where GCC is the native compiler, $prefix should be
# /usr. But the user can change it with configure --prefix=/foo/bar
native_prefix=/usr
! # local_prefix specifies where to find the directory /usr/local/include
# We don't use $(prefix) for this
! # because we always want GCC to search /usr/local/include
! # even if GCC is installed somewhere other than /usr/local.
# Think THREE TIMES before specifying any other value for this!
# DO NOT make this use $prefix!
! local_prefix=/usr/local
# Default is to let the Makefile set exec_prefix from $(prefix)
exec_prefix='$(prefix)'
--- 58,100 ----
# Default --srcdir to the directory where the script is found,
# if a directory was specified.
! # The first sed call works around a bug in the AmigaDOS port of sksh, where
! # $0 has a trailing slash appended to it. It is a NOP for other systems.
! # The third sed call is to convert `.//configure' to `./configure'.
! srcdir=`echo $0 | sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
if [ x$srcdir = x$0 ]
then
srcdir=
fi
+ # On systems where GCC is the native compiler, $prefix should be
+ # /usr. But the user can change it with configure --prefix=/foo/bar
+ native_prefix=/usr
+
host=
! # Note: For AmigaDOS we want this to default to /gnu unless we specify
! # otherwise to configure. We also don't want to have to remember to always
! # configure with "--prefix=/gnu". Changing it in Makefile.in or in
! # config/m68k/x-amigados is ineffective since configure will always change
! # it back in the final generated Makefile, so we have to go to the root of
! # the problem, which is here. There should be a way to do this in the
! # individual machine configuration files! -fnf
! # here. -fnf
! # Default prefix to "/gnu".
! prefix=/gnu
!
# On systems where GCC is the native compiler, $prefix should be
# /usr. But the user can change it with configure --prefix=/foo/bar
native_prefix=/usr
! # local_prefix specifies where to find the directory /gnu/local/include
# We don't use $(prefix) for this
! # because we always want GCC to search /gnu/local/include
! # even if GCC is installed somewhere other than /gnu/local.
# Think THREE TIMES before specifying any other value for this!
# DO NOT make this use $prefix!
! # Note: See AmigaDOS note above for this AmigaDOS specific change. -fnf
! # NoteII:We don't want to have yet-another-assign so we use /gnu/local
! local_prefix=/gnu/local
# Default is to let the Makefile set exec_prefix from $(prefix)
exec_prefix='$(prefix)'
***************
*** 88,93 ****
remove=rm
! hard_link=ln
! symbolic_link='ln -s'
copy=cp
--- 108,118 ----
remove=rm
! # AmigaDOS specific change. Although we support symbolic links using
! # the GNU tools, they need to be made using the syntax "somewhere:foo/bar"
! # and not "/somewhere/foo/bar", since they must be in standard AmigaDOS
! # format. This should probably be done by having GNU ln translate paths
! # that start with '/' to canonical AmigaDOS device:name form.
! hard_link=cp
! symbolic_link=cp
copy=cp
***************
*** 145,149 ****
# Double any backslashes or dollar signs in the argument.
if [ -n "${arg}" ] ; then
! program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
fi
program_transform_set=yes
--- 170,174 ----
# Double any backslashes or dollar signs in the argument.
if [ -n "${arg}" ] ; then
! program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
fi
program_transform_set=yes
***************
*** 152,156 ****
--program-prefix)
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
--- 177,181 ----
--program-prefix)
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,^,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
***************
*** 159,163 ****
--program-suffix)
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
--- 184,188 ----
--program-suffix)
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,\$\$,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
***************
*** 183,187 ****
;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
! srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
;;
-host | --host | --hos | --ho)
--- 208,212 ----
;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
! srcdir=`/bin/echo $arg | sed 's/-*s[a-z]*=//'`
;;
-host | --host | --hos | --ho)
***************
*** 189,193 ****
;;
-host=* | --host=* | --hos=* | --ho=*)
! host=`echo $arg | sed 's/-*h[a-z]*=//'`
;;
-target | --target | --targe | --targ | --tar | --ta | --t)
--- 214,218 ----
;;
-host=* | --host=* | --hos=* | --ho=*)
! host=`/bin/echo $arg | sed 's/-*h[a-z]*=//'`
;;
-target | --target | --targe | --targ | --tar | --ta | --t)
***************
*** 195,199 ****
;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
! target=`echo $arg | sed 's/-*t[a-z]*=//'`
;;
-build | --build | --buil | --bui | --bu | --b)
--- 220,224 ----
;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
! target=`/bin/echo $arg | sed 's/-*t[a-z]*=//'`
;;
-build | --build | --buil | --bui | --bu | --b)
***************
*** 201,205 ****
;;
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
! build=`echo $arg | sed 's/-*b[a-z]*=//'`
;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
--- 226,230 ----
;;
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
! build=`/bin/echo $arg | sed 's/-*b[a-z]*=//'`
;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
***************
*** 207,211 ****
;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
! prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
native_prefix=$prefix
;;
--- 232,236 ----
;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
! prefix=`/bin/echo $arg | sed 's/-*p[a-z]*=//'`
native_prefix=$prefix
;;
***************
*** 217,221 ****
| --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
| --loc=* | --lo=* | --l=*)
! local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
;;
-gxx-include-dir | --gxx-include-dir | --gxx-include \
--- 242,246 ----
| --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
| --loc=* | --lo=* | --l=*)
! local_prefix=`/bin/echo $arg | sed 's/-*l[-a-z]*=//'`
;;
-gxx-include-dir | --gxx-include-dir | --gxx-include \
***************
*** 227,231 ****
| --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
| --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
! gxx_include_dir=`echo $arg | sed 's/-*g[-a-z]*=//'`
;;
-exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
--- 252,256 ----
| --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
| --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
! gxx_include_dir=`/bin/echo $arg | sed 's/-*g[-a-z]*=//'`
;;
-exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
***************
*** 236,240 ****
| --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
| --exe=* | --ex=* | --e=*)
! exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
;;
-program-transform-name | --program-transform-name \
--- 261,265 ----
| --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
| --exe=* | --ex=* | --e=*)
! exec_prefix=`/bin/echo $arg | sed 's/-*e[-a-z]*=//'`
;;
-program-transform-name | --program-transform-name \
***************
*** 252,259 ****
| --program-transf=* | --program-trans=* | --program-tran=* \
| --program-tra=* | --program-tr=* | --program-t=*)
! arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
# Double any \ or $ in the argument.
if [ -n "${arg}" ] ; then
! program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
fi
program_transform_set=yes
--- 277,284 ----
| --program-transf=* | --program-trans=* | --program-tran=* \
| --program-tra=* | --program-tr=* | --program-t=*)
! arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
# Double any \ or $ in the argument.
if [ -n "${arg}" ] ; then
! program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
fi
program_transform_set=yes
***************
*** 267,273 ****
| --program-pref=* | --program-pre=* | --program-pr=* \
| --program-p=*)
! arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
--- 292,298 ----
| --program-pref=* | --program-pre=* | --program-pr=* \
| --program-p=*)
! arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,^,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
***************
*** 281,287 ****
| --program-suff=* | --program-suf=* | --program-su=* \
| --program-s=*)
! arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
--- 306,312 ----
| --program-suff=* | --program-suf=* | --program-su=* \
| --program-s=*)
! arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
if [ -n "${arg}" ]; then
! program_transform_name="${program_transform_name} -e s,\$\$,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
***************
*** 496,500 ****
# Set this to override the default target model.
target_cpu_default=
! # Set this to force use of install.sh.
broken_install=
# Set this to control which fixincludes program to use.
--- 521,526 ----
# Set this to override the default target model.
target_cpu_default=
! # Set this to force use of install.sh (if set to 'yes')
! # Set to name of installer to use a custom installer.
broken_install=
# Set this to control which fixincludes program to use.
***************
*** 1468,1471 ****
--- 1494,1507 ----
extra_headers=math-68881.h
;;
+ m68k-*-amigados)
+ xm_file=m68k/xm-amigados.h
+ out_file=m68k/amigados.c
+ tm_file=m68k/amigados.h
+ tmake_file=m68k/t-amigados
+ xmake_file=m68k/x-amigados
+ fixincludes=Makefile.in # Headers are already fixed.
+ broken_install=cp
+ install_headers_dir=install-headers-cp
+ ;;
m68k-wrs-vxworks*)
tm_file=m68k/vxm68k.h
***************
*** 2500,2513 ****
rm -f specs.h options.h
touch specs.h options.h
! for subdir in . $subdirs
do
! if [ -f $srcdir/$subdir/lang-specs.h ]; then
! echo "#include \"$subdir/lang-specs.h\"" >>specs.h
! lang_specs_files="$lang_specs_files $subdir/lang-specs.h"
! fi
! if [ -f $srcdir/$subdir/lang-options.h ]; then
! echo "#include \"$subdir/lang-options.h\"" >>options.h
! lang_options_files="$lang_options_files $subdir/lang-options.h"
! fi
done
--- 2536,2548 ----
rm -f specs.h options.h
touch specs.h options.h
! for lang_specs in $srcdir/*/lang-specs.h
do
! echo "#include \"$lang_specs\"" >>specs.h
! lang_specs_files="$lang_specs_files $lang_specs"
! done
! for lang_options in $srcdir/*/lang-options.h
! do
! echo "#include \"$lang_options\"" >>options.h
! lang_options_files="$lang_options_files $lang_options"
done
***************
*** 2615,2620 ****
else
rm -f Makefile.xx
! abssrcdir=`cd ${srcdir}; pwd`
! sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
--- 2650,2661 ----
else
rm -f Makefile.xx
! if [ x$host_broken_install = xyes ]
! then
! abssrcdir=`cd ${srcdir}; pwd`
! installer="${abssrcdir}/install.sh -c"
! else
! installer=$host_broken_install
! fi
! sed "s|^INSTALL = .*|INSTALL = ${installer}|" Makefile.tem > Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
***************
*** 2860,2867 ****
if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
then
! sed -e 's,CC=set-by-configure,CC=$(CC),' \
Makefile.tem > Makefile.xx
else
! sed -e "s,CC=set-by-configure,CC=\`case '$(CC)' in stage*) echo '$(CC)' | sed -e 's|stage|../stage|g';; *) echo '$(CC)';; esac\`," \
Makefile.tem > Makefile.xx
fi
--- 2901,2908 ----
if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
then
! sed -e 's,CC=set-by-configure,CC=\$(CC),' \
Makefile.tem > Makefile.xx
else
! sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
Makefile.tem > Makefile.xx
fi
diff -2rcN /usr/goinfre/gcc-2.7.0/cp/Make-lang.in gcc-2.7.0-amiga/cp/Make-lang.in
*** /usr/goinfre/gcc-2.7.0/cp/Make-lang.in Fri Jun 16 20:09:57 1995
--- gcc-2.7.0-amiga/cp/Make-lang.in Fri Jun 23 11:52:22 1995
***************
*** 74,78 ****
cxxmain.o: cplus-dem.c demangle.h
rm -f cxxmain.c
! ln -s $(srcdir)/cplus-dem.c cxxmain.c > /dev/null 2>&1 \
|| cp $(srcdir)/cplus-dem.c cxxmain.c
$(CC) -c -DMAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
--- 74,78 ----
cxxmain.o: cplus-dem.c demangle.h
rm -f cxxmain.c
! $(SYMLINK) $(srcdir)/cplus-dem.c cxxmain.c > /dev/null 2>&1 \
|| cp $(srcdir)/cplus-dem.c cxxmain.c
$(CC) -c -DMAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
***************
*** 122,126 ****
chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
! ln $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \
--- 122,126 ----
chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
! $(HARDLINK) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \
***************
*** 130,134 ****
chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
! ln $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \
--- 130,134 ----
chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
! $(HARDLINK) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \
***************
*** 194,197 ****
cd cp; \
for file in *[0-9a-zA-Z+]; do \
! ln $$file ../tmp/cp >/dev/null 2>&1 || cp $$file ../tmp/cp; \
done
--- 194,197 ----
cd cp; \
for file in *[0-9a-zA-Z+]; do \
! $(HARDLINK) $$file ../tmp/cp >/dev/null 2>&1 || cp $$file ../tmp/cp; \
done
diff -2rcN /usr/goinfre/gcc-2.7.0/cp/g++.c gcc-2.7.0-amiga/cp/g++.c
*** /usr/goinfre/gcc-2.7.0/cp/g++.c Thu Jun 15 13:23:15 1995
--- gcc-2.7.0-amiga/cp/g++.c Fri Jun 23 11:52:23 1995
***************
*** 242,246 ****
--- 242,250 ----
if (errno < sys_nerr)
+ #ifdef HAVE_STRERROR
+ s = concat ("%s: ", strerror(errno), "");
+ #else
s = concat ("%s: ", sys_errlist[errno], "");
+ #endif
else
s = "cannot open %s";
diff -2rcN /usr/goinfre/gcc-2.7.0/cpplib.c gcc-2.7.0-amiga/cpplib.c
*** /usr/goinfre/gcc-2.7.0/cpplib.c Thu Jun 15 12:24:38 1995
--- gcc-2.7.0-amiga/cpplib.c Fri Jun 23 11:52:24 1995
***************
*** 152,155 ****
--- 152,159 ----
static char *predefs = "";
#endif
+
+ #ifdef __amigados__
+ static int amigados_abs_filename ();
+ #endif
/* We let tm.h override the types used here, to handle trivial differences
***************
*** 3304,3308 ****
--- 3308,3317 ----
/* If specified file name is absolute, just open it. */
+ /* Phil.B 10-Apr-95 check for absolute filenames */
+ #ifdef __amigados__
+ if (amigados_abs_filename (fbeg, flen)) {
+ #else
if (*fbeg == '/') {
+ #endif
strncpy (fname, fbeg, flen);
fname[flen] = 0;
***************
*** 3327,3330 ****
--- 3336,3343 ----
continue;
strcpy (fname, searchptr->fname);
+ /* Phil.B 10-Arp-95 Avoir foo:/ situations */
+ #ifdef __amigados__
+ if (fname[strlen (fname) - 1] != ':')
+ #endif
strcat (fname, "/");
fname[strlen (fname) + flen] = 0;
***************
*** 3400,3403 ****
--- 3413,3420 ----
+ strlen (fname) + 2);
strcpy (p, searchptr->fname);
+ /* Phil.B 10-Arp-95 Avoir foo:/ situations */
+ #ifdef __amigados__
+ if (p[strlen (p) - 1] != ':')
+ #endif
strcat (p, "/");
strcat (p, fname);
***************
*** 7511,7514 ****
--- 7528,7554 ----
}
+ #ifdef __amigados__
+
+ /* This function returns whether the LEN characters long filename FNAME
+ is an absolute path specification. */
+
+ static int
+ amigados_abs_filename (fname, len)
+ char *fname;
+ int len;
+ {
+ /* we're using ixemul.library, which treats `/foo' as `foo:', so
+ fname[0] is to be considered absolute as well */
+ if (fname[0] == '/')
+ return 1;
+
+ /* else do an index() on fname, but one which is limited to len characters */
+ while (*fname && *fname != ':' && len)
+ fname++, len--;
+
+ return *fname == ':';
+ }
+ #endif /* __amigados__ */
+
/* TODO:
* No pre-compiled header file support.
diff -2rcN /usr/goinfre/gcc-2.7.0/cpplib.h gcc-2.7.0-amiga/cpplib.h
*** /usr/goinfre/gcc-2.7.0/cpplib.h Thu Jun 15 12:25:11 1995
--- gcc-2.7.0-amiga/cpplib.h Fri Jun 23 11:52:25 1995
***************
*** 316,319 ****
--- 316,324 ----
char verbose;
+ /* Phil.B 10-Apr-95 handle amiga process priority */
+ #ifdef __amigados__
+ int amiga_priority;
+ #endif /* __amigados__ */
+
/* Nonzero means use extra default include directories for C++. */
diff -2rcN /usr/goinfre/gcc-2.7.0/cppmain.c gcc-2.7.0-amiga/cppmain.c
*** /usr/goinfre/gcc-2.7.0/cppmain.c Thu Jun 15 12:25:35 1995
--- gcc-2.7.0-amiga/cppmain.c Fri Jun 23 11:52:25 1995
***************
*** 33,36 ****
--- 33,41 ----
cpp_options options;
+ #ifdef __amigados__
+ #include <proto/exec.h>
+ struct Task *amiga_task;
+ #endif /* __amigados__ */
+
/* More 'friendly' abort that prints the line and file.
config.h can #define abort fancy_abort if you like that sort of thing. */
***************
*** 53,56 ****
--- 58,70 ----
struct cpp_options *opts = &options;
+ #ifdef __amigados__
+ {
+ char *envstr;
+
+ if (envstr = getenv("GCCPRIORITY"))
+ if (((i = atoi(envstr)) > -20) && (i < 20)) opts->amiga_priority = i;
+ }
+ #endif /* __amigados__ */
+
p = argv[0] + strlen (argv[0]);
while (p != argv[0] && p[-1] != '/') --p;
***************
*** 67,70 ****
--- 81,91 ----
parse_in.show_column = 1;
+ #ifdef __amigados__
+ Forbid();
+ amiga_task = FindTask(NULL);
+ Permit();
+ SetTaskPri(amiga_task, opts->amiga_priority);
+ #endif /* __amigados__ */
+
i = push_parse_file (&parse_in, opts->in_fname);
if (i != SUCCESS_EXIT_CODE)
diff -2rcN /usr/goinfre/gcc-2.7.0/explow.c gcc-2.7.0-amiga/explow.c
*** /usr/goinfre/gcc-2.7.0/explow.c Thu Jun 15 12:30:10 1995
--- gcc-2.7.0-amiga/explow.c Fri Jun 23 11:52:26 1995
***************
*** 31,34 ****
--- 31,35 ----
#include "insn-codes.h"
+ rtx gen_stack_cleanup_call();
static rtx break_out_memory_refs PROTO((rtx));
***************
*** 1096,1099 ****
--- 1097,1109 ----
}
else
+ #endif
+ #if 1 /* HAVE_stack_on_heap */
+ if (TARGET_STACKCHECK)
+ emit_insn (gen_stack_management_call
+ (stack_pointer_rtx, size, "jbsr ___stkchk_d0"));
+ if (TARGET_STACKEXTEND)
+ emit_insn (gen_stack_management_call
+ (stack_pointer_rtx, size, "jbsr ___sub_d0_sp"));
+ else
#endif
{
diff -2rcN /usr/goinfre/gcc-2.7.0/final.c gcc-2.7.0-amiga/final.c
*** /usr/goinfre/gcc-2.7.0/final.c Thu Jun 15 12:32:51 1995
--- gcc-2.7.0-amiga/final.c Fri Jun 23 11:52:26 1995
***************
*** 2039,2042 ****
--- 2039,2046 ----
if (write_symbols != NO_DEBUG)
{
+ /* Phil.B: 03-Oct-94 added q_anote from albaugh@agames.com (Mike Albaugh) */
+ #if defined(__amigados__) && defined(ASM_NOTE_SOURCE_LINE)
+ ASM_NOTE_SOURCE_LINE(file,last_linenum,filename);
+ #endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG
diff -2rcN /usr/goinfre/gcc-2.7.0/fixincludes gcc-2.7.0-amiga/fixincludes
*** /usr/goinfre/gcc-2.7.0/fixincludes Sun Jun 11 18:37:31 1995
--- gcc-2.7.0-amiga/fixincludes Fri Jun 23 11:52:27 1995
***************
*** 58,61 ****
--- 58,64 ----
LINKS=false
fi
+ # AmigaDOS hack - we have symbolic links, but it's generally
+ # better to not depend on them working correctly.
+ LINKS=false
echo Finding directories and links to directories
diff -2rcN /usr/goinfre/gcc-2.7.0/gcc.c gcc-2.7.0-amiga/gcc.c
*** /usr/goinfre/gcc-2.7.0/gcc.c Thu Jun 15 12:38:02 1995
--- gcc-2.7.0-amiga/gcc.c Fri Jun 23 11:52:28 1995
***************
*** 225,228 ****
--- 225,235 ----
static int save_temps_flag;
+ #ifdef __amigados__
+ /* Phil.B: 03-Oct-94 Flag indicating process priority */
+ static int amiga_priority = 0;
+ /* Phil.B: 17-Apr-95 Flag indicating stack checking */
+ static int amiga_stackcheck = 0;
+ #endif /* __amigados__ */
+
/* The compiler version. */
***************
*** 817,820 ****
--- 824,831 ----
{"--pipe", "-pipe", 0},
{"--prefix", "-B", "a"},
+ /* Phil.B: 03-Oct-94, allow priority settings for all programs started by gcc */
+ #ifdef __amigados__
+ {"--priority", "-priority", "a"},
+ #endif /* __amigados__ */
{"--preprocess", "-E", 0},
{"--print-search-dirs", "-print-search-dirs", 0},
***************
*** 1348,1356 ****
#ifndef STANDARD_EXEC_PREFIX
! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
#endif /* !defined STANDARD_EXEC_PREFIX */
static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
! static char *standard_exec_prefix_1 = "/usr/lib/gcc/";
#ifdef MD_EXEC_PREFIX
static char *md_exec_prefix = MD_EXEC_PREFIX;
--- 1359,1367 ----
#ifndef STANDARD_EXEC_PREFIX
! #define STANDARD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
#endif /* !defined STANDARD_EXEC_PREFIX */
static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
! static char *standard_exec_prefix_1 = "/local/lib/gcc-lib/";
#ifdef MD_EXEC_PREFIX
static char *md_exec_prefix = MD_EXEC_PREFIX;
***************
*** 1358,1362 ****
#ifndef STANDARD_STARTFILE_PREFIX
! #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
#endif /* !defined STANDARD_STARTFILE_PREFIX */
--- 1369,1373 ----
#ifndef STANDARD_STARTFILE_PREFIX
! #define STANDARD_STARTFILE_PREFIX "/gnu/lib/"
#endif /* !defined STANDARD_STARTFILE_PREFIX */
***************
*** 1368,1376 ****
#endif
static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
! static char *standard_startfile_prefix_1 = "/lib/";
! static char *standard_startfile_prefix_2 = "/usr/lib/";
#ifndef TOOLDIR_BASE_PREFIX
! #define TOOLDIR_BASE_PREFIX "/usr/local/"
#endif
static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
--- 1379,1387 ----
#endif
static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
! static char *standard_startfile_prefix_1 = "/local/lib/";
! static char *standard_startfile_prefix_2 = "/local/lib/";
#ifndef TOOLDIR_BASE_PREFIX
! #define TOOLDIR_BASE_PREFIX "/local/"
#endif
static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
***************
*** 1573,1576 ****
--- 1584,1591 ----
#endif
+ #ifdef __amigados__
+ if (!base) /* No env var set */
+ base = "RAM:";
+ #else
base = choose_temp_base_try (concat4 (dir_separator_str, "usr",
dir_separator_str, "tmp"),
***************
*** 1578,1581 ****
--- 1593,1598 ----
base = choose_temp_base_try (concat (dir_separator_str, "tmp"), base);
+ #endif
+
/* If all else fails, use the current directory! */
if (base == (char *)0) base = concat(".", dir_separator_str);
***************
*** 1586,1590 ****
strcpy (temp_filename, base);
if (len > 0 && temp_filename[len-1] != '/'
! && temp_filename[len-1] != DIR_SEPARATOR)
temp_filename[len++] = DIR_SEPARATOR;
strcpy (temp_filename + len, "ccXXXXXX");
--- 1603,1611 ----
strcpy (temp_filename, base);
if (len > 0 && temp_filename[len-1] != '/'
! && temp_filename[len-1] != DIR_SEPARATOR
! #ifdef VOL_SEPARATOR
! && temp_filename[len-1] != VOL_SEPARATOR
! #endif
! )
temp_filename[len++] = DIR_SEPARATOR;
strcpy (temp_filename + len, "ccXXXXXX");
***************
*** 1747,1751 ****
/* Determine the filename to execute (special case for absolute paths). */
! if (*name == '/' || *name == DIR_SEPARATOR)
{
if (access (name, mode))
--- 1768,1776 ----
/* Determine the filename to execute (special case for absolute paths). */
! if (*name == '/' || *name == DIR_SEPARATOR
! #ifdef VOL_SEPARATOR
! || index (name, VOL_SEPARATOR)
! #endif
! )
{
if (access (name, mode))
***************
*** 1967,1970 ****
--- 1992,1996 ----
(i.e. its output should be piped to the next one.) */
+ #ifndef PEXECUTE
#ifdef __MSDOS__
***************
*** 2171,2174 ****
--- 2197,2201 ----
}
#endif /* OS2 or _WIN32 */
+ #endif /* !defined (PEXECUTE) */
***************
*** 2266,2272 ****
--- 2293,2305 ----
char *string = commands[i].argv[0];
+ #ifdef PEXECUTE
+ commands[i].pid = PEXECUTE (string != commands[i].prog,
+ string, commands[i].argv,
+ i + 1 < n_commands);
+ #else
commands[i].pid = pexecute (string != commands[i].prog,
string, commands[i].argv,
i + 1 < n_commands);
+ #endif
if (string != commands[i].prog)
***************
*** 2291,2294 ****
--- 2324,2330 ----
int pid;
+ #ifdef PEXECUTE_RESULT
+ pid = PEXECUTE_RESULT (status, commands[i]);
+ #else /* PEXECUTE_RESULT */
#ifdef __MSDOS__
status = pid = commands[i].pid;
***************
*** 2300,2303 ****
--- 2336,2340 ----
#endif
#endif
+ #endif /* PEXECUTE_RESULT */
if (pid < 0)
abort ();
***************
*** 2419,2422 ****
--- 2456,2460 ----
{
strncpy (nstore, startp, endp-startp);
+ #ifndef __amigados__
if (endp == startp)
strcpy (nstore, concat (".", dir_separator_str));
***************
*** 2428,2431 ****
--- 2466,2478 ----
else
nstore[endp-startp] = 0;
+ #else
+ if (endp[-1] != '/' && endp[-1] != ':')
+ {
+ nstore[endp-startp] = '/';
+ nstore[endp-startp+1] = 0;
+ }
+ else
+ nstore[endp-startp] = 0;
+ #endif
add_prefix (&exec_prefixes, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
***************
*** 2450,2453 ****
--- 2497,2501 ----
{
strncpy (nstore, startp, endp-startp);
+ #ifndef __amigados__
if (endp == startp)
strcpy (nstore, concat (".", dir_separator_str));
***************
*** 2459,2462 ****
--- 2507,2519 ----
else
nstore[endp-startp] = 0;
+ #else
+ if (endp[-1] != '/' && endp[-1] != ':')
+ {
+ nstore[endp-startp] = '/';
+ nstore[endp-startp+1] = 0;
+ }
+ else
+ nstore[endp-startp] = 0;
+ #endif
add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
***************
*** 2482,2485 ****
--- 2539,2543 ----
{
strncpy (nstore, startp, endp-startp);
+ #ifndef __amigados__
if (endp == startp)
strcpy (nstore, concat (".", dir_separator_str));
***************
*** 2491,2494 ****
--- 2549,2561 ----
else
nstore[endp-startp] = 0;
+ #else
+ if (endp[-1] != '/' && endp[-1] != ':')
+ {
+ nstore[endp-startp] = '/';
+ nstore[endp-startp+1] = 0;
+ }
+ else
+ nstore[endp-startp] = 0;
+ #endif
add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
***************
*** 2510,2513 ****
--- 2577,2590 ----
for (i = 1; i < argc; i++)
{
+ #ifdef __amigados__
+ /* Phil.B 03-Oct-94 added -priority keyword */
+ if (! strcmp (argv[i], "-priority"))
+ {
+ if (i + 1 == argc)
+ fatal ("argument to `-priority' is missing");
+ amiga_priority = atoi(argv[++i]);
+ }
+ else
+ #endif /* __amigados__ */
if (! strcmp (argv[i], "-dumpspecs"))
{
***************
*** 4483,4490 ****
--- 4560,4571 ----
int len;
+ #ifdef FILE_NAME_NONDIRECTORY
+ input_basename = FILE_NAME_NONDIRECTORY (input_filename);
+ #else
input_basename = input_filename;
for (p = input_filename; *p; p++)
if (*p == '/' || *p == DIR_SEPARATOR)
input_basename = p + 1;
+ #endif
/* Find a suffix starting with the last period,
diff -2rcN /usr/goinfre/gcc-2.7.0/genconfig.c gcc-2.7.0-amiga/genconfig.c
*** /usr/goinfre/gcc-2.7.0/genconfig.c Thu Jun 15 12:40:18 1995
--- gcc-2.7.0-amiga/genconfig.c Fri Jun 23 11:52:29 1995
***************
*** 305,310 ****
--- 305,318 ----
from the machine description file `md'. */\n\n");
+ #ifdef __amigados__
+ /* this constant probably better be 14 in general, or a cross compiling
+ host might choke on some amigados header files... */
+
+ /* Allow at least 14 operands for the sake of asm constructs. */
+ max_recog_operands = 14;
+ #else
/* Allow at least 10 operands for the sake of asm constructs. */
max_recog_operands = 9; /* We will add 1 later. */
+ #endif
max_dup_operands = 1;
diff -2rcN /usr/goinfre/gcc-2.7.0/ginclude/stdarg.h gcc-2.7.0-amiga/ginclude/stdarg.h
*** /usr/goinfre/gcc-2.7.0/ginclude/stdarg.h Sun Apr 30 13:10:28 1995
--- gcc-2.7.0-amiga/ginclude/stdarg.h Fri Jun 23 11:52:29 1995
***************
*** 168,170 ****
--- 168,178 ----
#endif /* not _ANSI_STDARG_H_ */
+
+ #ifdef __amigados__
+ # ifndef _VA_LIST
+ # define _VA_LIST
+ typedef __gnuc_va_list va_list;
+ # endif
+ #endif /* __amigados__ */
+
#endif /* not _STDARG_H */
diff -2rcN /usr/goinfre/gcc-2.7.0/ginclude/stddef.h gcc-2.7.0-amiga/ginclude/stddef.h
*** /usr/goinfre/gcc-2.7.0/ginclude/stddef.h Wed May 31 00:02:59 1995
--- gcc-2.7.0-amiga/ginclude/stddef.h Fri Jun 23 11:52:29 1995
***************
*** 4,7 ****
--- 4,47 ----
#ifndef __STDDEF_H__
+ #ifdef __amigados__
+
+ /* GNU libc has special support in this file, 4.3bsd-net2 libc deserves that
+ just as well. The system headers are ANSI compliant, the used compiler IS
+ gcc, so it's really ok to use the system header, no reason to hassle
+ with a jungle of ifdefs. Besides, amigados is only defined if compiling
+ with host=amigados, it doesn't apply if compiling with target=amigados
+ on a different host with possibly different system headers. Same thing
+ would apply to gstdarg.h and gvarargs.h, but those headers are more
+ easily fixable than this one and I'm sick of writing the same comment
+ there as well. MW
+
+ Include the contents of <stddef.h> inline rather than with a #include,
+ to avoid infinite include recursion when this file is installed in
+ gcc's include directory as stddef.h. (fnf) */
+
+ #define _STDDEF_H_
+
+ #include <machine/ansi.h>
+
+ typedef _PTRDIFF_T_ ptrdiff_t;
+
+ #ifdef _SIZE_T_
+ typedef _SIZE_T_ size_t;
+ #undef _SIZE_T_
+ #endif
+
+ #ifdef _WCHAR_T_
+ typedef _WCHAR_T_ wchar_t;
+ #undef _WCHAR_T_
+ #endif
+
+ #ifndef NULL
+ #define NULL 0
+ #endif
+
+ #define offsetof(type, member) ((size_t)(&((type *)0)->member))
+
+ #else /* not __amigados__ */
+
/* Any one of these symbols __need_* means that GNU libc
wants us just to define one data type. So don't define
***************
*** 238,241 ****
--- 278,283 ----
#define __WCHAR_TYPE__ int
#endif
+
+ #endif /* not __amigados__ */
typedef __WCHAR_TYPE__ wchar_t;
#endif
diff -2rcN /usr/goinfre/gcc-2.7.0/ginclude/varargs.h gcc-2.7.0-amiga/ginclude/varargs.h
*** /usr/goinfre/gcc-2.7.0/ginclude/varargs.h Sun Apr 30 13:10:30 1995
--- gcc-2.7.0-amiga/ginclude/varargs.h Fri Jun 23 11:52:30 1995
***************
*** 185,186 ****
--- 185,193 ----
#undef _BSD_VA_LIST
#endif
+
+ #ifdef __amigados__
+ # ifndef _VA_LIST
+ # define _VA_LIST
+ typedef __gnuc_va_list va_list;
+ # endif
+ #endif /* __amigados__ */
Binary files /usr/goinfre/gcc-2.7.0/libb/libgcc.a and gcc-2.7.0-amiga/libb/libgcc.a differ
Binary files /usr/goinfre/gcc-2.7.0/libb/libm020/libgcc.a and gcc-2.7.0-amiga/libb/libm020/libgcc.a differ
Binary files /usr/goinfre/gcc-2.7.0/libm020/libgcc.a and gcc-2.7.0-amiga/libm020/libgcc.a differ
diff -2rcN /usr/goinfre/gcc-2.7.0/protoize.c gcc-2.7.0-amiga/protoize.c
*** /usr/goinfre/gcc-2.7.0/protoize.c Thu Jun 15 12:57:09 1995
--- gcc-2.7.0-amiga/protoize.c Fri Jun 23 11:52:30 1995
***************
*** 884,889 ****
--- 884,894 ----
struct default_include *p;
+ #ifdef FILE_NAME_ABSOLUTE_P
+ if (! FILE_NAME_ABSOLUTE_P (path))
+ abort ();
+ #else
if (path[0] != '/')
abort (); /* Must be an absolutized filename. */
+ #endif
for (p = include_defaults; p->fname; p++)
***************
*** 1312,1316 ****
--- 1317,1325 ----
const char *src_p;
+ #ifdef FILE_NAME_ABSOLUTE_P
+ if (! FILE_NAME_ABSOLUTE_P (rel_filename))
+ #else
if (rel_filename[0] != '/')
+ #endif
{
src_p = cwd2;
***************
*** 1575,1578 ****
--- 1584,1606 ----
}
+ /* Use this macro to advance a char * over the filename part in a line
+ read from an aux-info file. */
+
+ #ifndef __amigados__
+ /* Version for file systems where the colon has no special meaning */
+ #define ADVANCE_PAST_FILENAME(CP) \
+ while (* (CP) != ':') (CP)++
+ #else
+ /* Have to heuristically decide whether the colon is part of the filename
+ or whether it serves to delimit the filename from the line number. If
+ it's the latter case, then the character following the colon *must*
+ be a digit. Note that this heuristic fails if the filename starts
+ with a digit. */
+ #define ADVANCE_PAST_FILENAME(CP) \
+ while ((CP)[0] != ':' || !isdigit ((CP)[1])) \
+ (CP)++;
+ #endif
+
+
/* Given a line from an aux info file, and a time at which the aux info
file it came from was created, check to see if the item described in
***************
*** 1596,1601 ****
const char *filename_start = p = l + 3;
! while (*p != ':')
! p++;
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
--- 1624,1628 ----
const char *filename_start = p = l + 3;
! ADVANCE_PAST_FILENAME (p);
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
***************
*** 1654,1659 ****
char *filename;
! while (*p != ':')
! p++;
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
--- 1681,1685 ----
char *filename;
! ADVANCE_PAST_FILENAME (p);
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
***************
*** 2382,2386 ****
char *p = aux_info_base;
! while (*p != ':')
p++;
p++;
--- 2408,2414 ----
char *p = aux_info_base;
! /* have to make sure at least one space is following the colon to make
! sure the colon is not part of the filename */
! while (*p != ':' && p[1] != ' ')
p++;
p++;
***************
*** 2396,2400 ****
aux_info_second_line = p;
aux_info_relocated_name = 0;
! if (invocation_filename[0] != '/')
{
/* INVOCATION_FILENAME is relative;
--- 2424,2432 ----
aux_info_second_line = p;
aux_info_relocated_name = 0;
! #ifdef FILE_NAME_ABSOLUTE_P
! if (! FILE_NAME_ABSOLUTE_P (invocation_filename))
! #else
! if (invocation_filename[0] != '/')
! #endif
{
/* INVOCATION_FILENAME is relative;
***************
*** 2485,2489 ****
/* Check an individual filename for a .c suffix. If the filename has this
! suffix, rename the file such that its suffix is changed to .C. This
function implements the -C option. */
--- 2517,2521 ----
/* Check an individual filename for a .c suffix. If the filename has this
! suffix, rename the file such that its suffix is changed to .cc. This
function implements the -C option. */
***************
*** 2494,2498 ****
const char *filename = hp->symbol;
int last_char_index = strlen (filename) - 1;
! char *const new_filename = (char *) alloca (strlen (filename) + 1);
/* Note that we don't care here if the given file was converted or not. It
--- 2526,2530 ----
const char *filename = hp->symbol;
int last_char_index = strlen (filename) - 1;
! char *const new_filename = (char *) alloca (strlen (filename) + 2);
/* Note that we don't care here if the given file was converted or not. It
***************
*** 2506,2511 ****
strcpy (new_filename, filename);
! new_filename[last_char_index] = 'C';
if (my_link (filename, new_filename) == -1)
{
--- 2538,2560 ----
strcpy (new_filename, filename);
! strcat (new_filename + last_char_index, "cc");
!
! /* use rename(2) if available !! Update config files to include HAVE_rename
! if the used OS provides it. Advantages are: it's atomic, it's one
! system call compared to two. */
+ #ifdef HAVE_rename
+ /* if the mentioned systems (POSIX 1003.1-1988) have rename(2), this has
+ to be changed to `my_rename' as well. */
+
+ if (rename (filename, new_filename) == -1)
+ {
+ fprintf (stderr, "%s: warning: can't rename file `%s' to `%s': %s\n",
+ pname, shortpath (NULL, filename),
+ shortpath (NULL, new_filename), my_strerror(errno));
+ errors++;
+ return;
+ }
+ #else
if (my_link (filename, new_filename) == -1)
{
***************
*** 2524,2527 ****
--- 2573,2577 ----
return;
}
+ #endif
}
diff -2rcN /usr/goinfre/gcc-2.7.0/real.c gcc-2.7.0-amiga/real.c
*** /usr/goinfre/gcc-2.7.0/real.c Thu Jun 15 12:57:39 1995
--- gcc-2.7.0-amiga/real.c Fri Jun 23 11:52:31 1995
***************
*** 4422,4428 ****
--- 4422,4434 ----
{
if (sign)
+ #ifdef __amigados__
sprintf (wstring, " -Infinity ");
else
sprintf (wstring, " Infinity ");
+ #else
+ sprintf (wstring, " -NaN ");
+ else
+ sprintf (wstring, " NaN ");
+ #endif
goto bxit;
}
diff -2rcN /usr/goinfre/gcc-2.7.0/rtl.def gcc-2.7.0-amiga/rtl.def
*** /usr/goinfre/gcc-2.7.0/rtl.def Thu Jun 15 13:03:32 1995
--- gcc-2.7.0-amiga/rtl.def Fri Jun 23 11:52:32 1995
***************
*** 705,710 ****
--- 705,712 ----
DEF_RTL_EXPR(FLOAT_TRUNCATE, "float_truncate", "e", '1')
+ #ifndef SUPPRESS_RTL_FLOAT_DEFINITION /* Amiga hack - avoid clash with <exec/types.h> typedef */
/* Conversion of fixed point operand to floating point value. */
DEF_RTL_EXPR(FLOAT, "float", "e", '1')
+ #endif
/* With fixed-point machine mode:
diff -2rcN /usr/goinfre/gcc-2.7.0/scan-types.sh gcc-2.7.0-amiga/scan-types.sh
*** /usr/goinfre/gcc-2.7.0/scan-types.sh Mon Apr 18 08:07:12 1994
--- gcc-2.7.0-amiga/scan-types.sh Fri Jun 23 11:52:33 1995
***************
*** 1,3 ****
! #! /bin/sh
# Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
# Emits macros definitions for these, and some other types.
--- 1,3 ----
! #!/bin/sh
# Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
# Emits macros definitions for these, and some other types.
diff -2rcN /usr/goinfre/gcc-2.7.0/toplev.c gcc-2.7.0-amiga/toplev.c
*** /usr/goinfre/gcc-2.7.0/toplev.c Thu Jun 15 13:09:51 1995
--- gcc-2.7.0-amiga/toplev.c Sun Jun 25 15:45:16 1995
***************
*** 56,59 ****
--- 56,62 ----
#include "input.h"
#include "tree.h"
+ #ifdef __amigados__
+ #define SUPPRESS_RTL_FLOAT_DEFINITION /* Avoid <exec/types.h> and rtl.def typedef clash for "float" */
+ #endif
#include "rtl.h"
#include "flags.h"
***************
*** 142,145 ****
--- 145,156 ----
static char *decl_name ();
+ #ifdef __amigados__
+ /* Phil.B: 03-Oct-94 Flag indicating process priority */
+ static int amiga_priority = -1;
+ static int amiga_old_priority;
+ #include <proto/exec.h>
+ struct Task *amiga_task;
+ #endif /* __amigados__ */
+
/* Name of program invoked, sans directories. */
***************
*** 540,543 ****
--- 551,555 ----
{"writable-strings", &flag_writable_strings, 1},
{"peephole", &flag_no_peephole, 0},
+ {"large-baserel", &flag_pic, 4},
{"force-mem", &flag_force_mem, 1},
{"force-addr", &flag_force_addr, 1},
***************
*** 558,561 ****
--- 570,574 ----
{"pic", &flag_pic, 1},
{"PIC", &flag_pic, 2},
+ {"baserel", &flag_pic, 3},
{"fast-math", &flag_fast_math, 1},
{"common", &flag_no_common, 0},
***************
*** 1361,1364 ****
--- 1374,1382 ----
va_list ap;
+ /* PhB 25-Jun-95: restore old process priority before exiting */
+ #ifdef __amigados__
+ SetTaskPri(amiga_task, amiga_old_priority);
+ #endif /* __amigados__ */
+
VA_START (ap, s);
***************
*** 1918,1921 ****
--- 1936,1942 ----
char *input_name;
{
+ #ifdef FILE_NAME_NONDIRECTORY
+ char *na = FILE_NAME_NONDIRECTORY (input_name);
+ #else
int len = strlen (input_name);
char *na = input_name + len;
***************
*** 1928,1931 ****
--- 1949,1953 ----
na--;
}
+ #endif
#ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
***************
*** 3320,3323 ****
--- 3342,3348 ----
&& p[-1] != DIR_SEPARATOR
#endif
+ #ifdef VOL_SEPARATOR
+ && p[-1] != VOL_SEPARATOR
+ #endif
)
--p;
***************
*** 3336,3339 ****
--- 3361,3373 ----
#endif /* RLIMIT_STACK */
+ #ifdef __amigados__
+ {
+ char *envstr;
+
+ if (envstr = getenv("GCCPRIORITY"))
+ if (((i = atoi(envstr)) > -20) && (i < 20)) amiga_priority = i;
+ }
+ #endif /* __amigados__ */
+
signal (SIGFPE, float_signal);
***************
*** 3581,3584 ****
--- 3615,3631 ----
else if (!strcmp (str, "pedantic-errors"))
flag_pedantic_errors = pedantic = 1;
+ #ifdef __amigados__
+ else if (!strcmp (str, "priority"))
+ {
+ char *p = str + 1;
+
+ if (*p)
+ amiga_priority = atoi (p);
+ if (amiga_priority < -25)
+ amiga_priority = -25;
+ else if (amiga_priority > 25)
+ amiga_priority = 25;
+ }
+ #endif /* __amigados__ */
else if (!strcmp (str, "quiet"))
quiet_flag = 1;
***************
*** 3830,3833 ****
--- 3877,3887 ----
}
+ #ifdef __amigados__
+ Forbid();
+ amiga_task = FindTask(NULL);
+ Permit();
+ amiga_old_priority = SetTaskPri(amiga_task, amiga_priority);
+ #endif /* __amigados__ */
+
/* Initialize for bytecode output. A good idea to do this as soon as
possible after the "-f" options have been parsed. */
***************
*** 3916,3920 ****
compile_file (filename);
! #if !defined(OS2) && !defined(VMS) && !defined(_WIN32)
if (flag_print_mem)
{
--- 3970,3974 ----
compile_file (filename);
! #if !defined(OS2) && !defined(VMS) && !defined(_WIN32) && !defined (__amigados__)
if (flag_print_mem)
{
***************
*** 3934,3938 ****
#endif /* not USG */
}
! #endif /* not OS2 and not VMS and not _WIN32 */
if (errorcount)
--- 3988,3998 ----
#endif /* not USG */
}
! #endif /* not OS2 and not VMS and not _WIN32 and not __amigados__ */
!
! /* PhB 25-Jun-95: restore old process priority before exiting */
! #ifdef __amigados__
! SetTaskPri(amiga_task, amiga_old_priority);
! #endif /* __amigados__ */
!
if (errorcount)